fixes #18 relative link bug

This commit is contained in:
Matthew Scragg 2014-09-20 17:15:12 -05:00
parent 813d7cfc51
commit b637ce5df9
3 ha cambiato i file con 12 aggiunte e 7 eliminazioni

Vedi File

@ -1,6 +1,3 @@
body {
}
.navbar {
height: 50px !important;
min-height: 49px !important;

Vedi File

@ -58,7 +58,7 @@ hljs.initHighlightingOnLoad();
var MDR = {
meta: null,
md: null,
sanitize: true, // Override
sanitize: false, // Override
parse: function(md){ return marked(md); },
convert: function(md, sanitize){
if (this.sanitize !== null) {
@ -75,9 +75,17 @@ var MDR = {
if (sanitize) {
// Causes some problems with inline styles
html = html_sanitize(html, function(url) {
if(/^(\/|https?:\/\/)/.test(url)) {
return url
try {
var prot = decodeURIComponent(unescape(url))
.replace(/[^\w:]/g, '')
.toLowerCase();
} catch (e) {
return '';
}
if (prot.indexOf('javascript:') === 0) {
return '';
}
return prot;
}, function(id){
return id;
});

Vedi File

@ -8,7 +8,7 @@ with open('README.md') as f:
with open('requirements.txt') as f:
required = f.read().splitlines()
VERSION = '0.1.9'
VERSION = '0.1.10'
CLASSIFIERS = [
'Intended Audience :: Developers',