diff --git a/admin/js/hyperdown.js b/admin/js/hyperdown.js
index de20feea..aec017d6 100644
--- a/admin/js/hyperdown.js
+++ b/admin/js/hyperdown.js
@@ -1 +1 @@
-(function(){var t,k,s,g,d,c,B,$,f,b=[].slice;function e(){this.commonWhiteList="kbd|b|i|strong|em|sup|sub|br|code|del|a|hr|small",this.blockHtmlTags="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|svg|script|noscript",this.specialWhiteList={table:"table|tbody|thead|tfoot|tr|td|th"},this.hooks={},this.html=!1,this.line=!1,this.blockParsers=[["code",10],["shtml",20],["pre",30],["ahtml",40],["shr",50],["list",60],["math",70],["html",80],["footnote",90],["definition",100],["quote",110],["table",120],["sh",130],["mh",140],["dhr",150],["default",9999]],this.parsers={}}f=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},c=function(t){return t.replace(/[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},d="A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",B=function(t,e,n){var s,r,l,i,o,a;if(t instanceof Array)if(e instanceof Array)for(s=r=0,i=t.length;r/g,">").replace(/"/g,""")},$=function(t,e){var n,s,r,l,i;if(null==e&&(e=null),null==e)return t.replace(/^\s*/,"").replace(/\s*$/,"");for(i="",s=r=0,l=e.length-1;0<=l?r<=l:l<=r;s=0<=l?++r:--r)n=e[s],i+=c(n);return i="["+i+"]*",t.replace(new RegExp("^"+i),"").replace(new RegExp(i+"$"),"")},k=function(t){var e,n,s,r=[];if(t instanceof Array)for(n=e=0,s=t.length;e "+this.markLine(n,s)+g(t.join("\n"))+"
"}return t},e.prototype.parse=function(t,e,n){var s,r,l,i,o,a,c,h,p,u;for(null==e&&(e=!1),null==n&&(n=0),a=[],s=this.parseBlock(t,a),l="",e&&1===s.length&&"normal"===s[0][0]&&(s[0][3]=!0),i=0,o=s.length;i"+g(t[3])+"")}))).replace(/(^|[^\\])(\$+)(.+?)\2/gm,(l=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return t[1]+l.makeHolder(t[2]+g(t[3])+t[2])}))).replace(/\\(.)/g,(i=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=t[1].match(/^[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]$/)?"":"\\",t=g(t[1]);return t=t.replace(/\$/g,"$"),i.makeHolder(e+t)}))).replace(/<(https?:\/\/.+)>/gi,(o=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=o.cleanUrl(t[1]),t=o.call("parseLink",t[1]);return o.makeHolder(''+t+"")}))).replace(/<(\/?)([a-z0-9-]+)(\s+[^>]*)?>/gi,(a=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return a.html||0<=("|"+a.commonWhiteList+"|"+e+"|").indexOf("|"+t[2].toLowerCase()+"|")?a.makeHolder(t[0]):a.makeHolder(g(t[0]))})),this.html&&(t=t.replace(//g,(c=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return c.makeHolder(t[0])}))),t=(t=(t=(t=(t=(t=B(["<",">"],["<",">"],t)).replace(/\[\^((?:[^\]]|\\\]|\\\[)+?)\]/g,(h=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=h.footnotes.indexOf(t[1]);return e<0&&(e=h.footnotes.length+1,h.footnotes.push(h.parseInline(t[1],"",!1))),h.makeHolder(''+e+"")}))).replace(/!\[((?:[^\]]|\\\]|\\\[)*?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,(p=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=g(p.escapeBracket(t[1])),t=p.escapeBracket(t[2]);return t=p.cleanUrl(t),p.makeHolder('')}))).replace(/!\[((?:[^\]]|\\\]|\\\[)*?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g,(u=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=g(u.escapeBracket(t[1])),e=null!=u.definitions[t[2]]?'
':e;return u.makeHolder(e)}))).replace(/\[((?:[^\]]|\\\]|\\\[)+?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,(f=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=f.parseInline(f.escapeBracket(t[1]),"",!1,!1),t=f.escapeBracket(t[2]);return t=f.cleanUrl(t),f.makeHolder(''+e+"")}))).replace(/\[((?:[^\]]|\\\]|\\\[)+?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g,(k=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=k.parseInline(k.escapeBracket(t[1]),"",!1,!1),e=null!=k.definitions[t[2]]?''+e+"":e;return k.makeHolder(e)})),t=(t=this.parseInlineCallback(t)).replace(/<([_a-z0-9-\.\+]+@[^@]+\.[a-z]{2,})>/gi,'$1'),s&&(s=new RegExp('(^|[^"])((https?):['+d+'_0-9-\\./%#!@\\?\\+=~\\|\\,&\\(\\)]+)($|[^"])',"ig"),t=t.replace(s,(m=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=m.call("parseLink",t[2]);return t[1]+''+e+""+t[4]}))),t=this.call("afterParseInlineBeforeRelease",t),t=this.releaseHolder(t,n),t=this.call("afterParseInline",t)},e.prototype.parseInlineCallback=function(t){var e,n,s,r,l,i,o;return t=(t=(t=(t=(t=(t=(t=t.replace(/(\*{3})((?:.|\r)+?)\1/gm,(e=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return""+e.parseInlineCallback(t[2])+""}))).replace(/(\*{2})((?:.|\r)+?)\1/gm,(n=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return""+n.parseInlineCallback(t[2])+""}))).replace(/(\*)((?:.|\r)+?)\1/gm,(s=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return""+s.parseInlineCallback(t[2])+""}))).replace(/(\s+|^)(_{3})((?:.|\r)+?)\2(\s+|$)/gm,(r=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return t[1]+""+r.parseInlineCallback(t[3])+""+t[4]}))).replace(/(\s+|^)(_{2})((?:.|\r)+?)\2(\s+|$)/gm,(l=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return t[1]+""+l.parseInlineCallback(t[3])+""+t[4]}))).replace(/(\s+|^)(_)((?:.|\r)+?)\2(\s+|$)/gm,(i=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return t[1]+""+i.parseInlineCallback(t[3])+""+t[4]}))).replace(/(~{2})((?:.|\r)+?)\1/gm,(o=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return"
"+o.parseInlineCallback(t[2])+""}))},e.prototype.parseBlock=function(t,e){for(var n,s,r,l,i,o,a,c,h,p=t.split("\n"),u=0,f=p.length;u
"},e.prototype.parsePre=function(t,e,n){return t=t.map(function(t){return g(t.substring(4))}),(n=this.markLines(t,n).join("\n")).match(/^\s*$/)?"":""+n+"
"},e.prototype.parseAhtml=function(t,e,n){return $(this.markLines(t,n).join("\n"))},e.prototype.parseShtml=function(t,e,n){return $(this.markLines(t.slice(1,-1),n+1).join("\n"))},e.prototype.parseMath=function(t,e,n,s){return""+n+""+this.parse(t,!0,n)+"
"},e.prototype.parseList=function(t,e,n){for(var s,r,l,i,o,a,c,h,p,u,f,k,m="",g=99999,d=99999,B=!1,b=!1,y=[],v=s=0,$=t.length;s<$;v=++s)(h=(c=t[v]).match(/^(\s*)((?:[0-9]+\.?)|\-|\+|\*)(\s+)(.*)$/i))?(u=h[1].length,k=0<="+-*".indexOf(h[2])?"ul":"ol",g=Math.min(u,g),B=!0,0"+this.parse(i.join("\n"),!0,n+o)+""),l!==k&&(l&&(m+=""+l+">"),m+="<"+k+">"),o=v,i=[f],l=k)):i.push(p.replace(new RegExp("^\\s{"+d+"}"),""));return 0",s)c=(u=s[y])[0],f=u[1],d+="<"+(u=g?"th":"td"),1 ",g?d+="":B=B&&!1}return null!==B&&(d+=""),d+""},e.prototype.parseHr=function(t,e,n){return this.line?'
':"
"},e.prototype.parseNormal=function(t,e,n){var s,r;return null==e&&(e=!1),s=0,t=t.map((r=this,function(t){return(t=r.parseInline(t)).match(/^\s*$/)||(t=r.markLine(n+s)+t),s+=1,t})),(t=(t=(t=$(t.join("\n"))).replace(/(\n\s*){2,}/g,"
")).replace(/\n/g,"
")).match(/^\s*$/)?"":e?t:"
"+t+"
"},e.prototype.parseFootnote=function(t,e){e[0];var e=e[1],e=this.footnotes.indexOf(e);return 0<=e&&((t=t.slice(0))[0]=t[0].replace(/^\[\^((?:[^\]]|\]|\[)+?)\]:/,""),this.footnotes[e]=t),""},e.prototype.parseDefinition=function(){return""},e.prototype.parseHtml=function(t,e,n){var s;return t=t.map((s=this,function(t){return s.parseInline(t,null!=s.specialWhiteList[e]?s.specialWhiteList[e]:"")})),this.markLines(t,n).join("\n")},e.prototype.cleanUrl=function(t){var e=new RegExp("^\\s*((http|https|ftp|mailto):["+d+"_a-z0-9-:\\.\\*/%#;!@\\?\\+=~\\|\\,&\\(\\)]+)","i"),n=new RegExp("^\\s*(["+d+"_a-z0-9-:\\.\\*/%#!@\\?\\+=~\\|\\,&]+)","i");return(e=t.match(e))||(e=t.match(n))?e[1]:"#"},e.prototype.escapeBracket=function(t){return B(["\\[","\\]","\\(","\\)"],["[","]","(",")"],t)},e.prototype.startBlock=function(t,e,n){return null==n&&(n=null),this.pos+=1,this.current=t,this.blocks.push([t,e,e,n]),this},e.prototype.endBlock=function(){return this.current="normal",this},e.prototype.isBlock=function(t,e){return null==e&&(e=null),this.current===t&&(null===e||this.blocks[this.pos][3]===e)},e.prototype.getBlock=function(){return null!=this.blocks[this.pos]?this.blocks[this.pos]:null},e.prototype.setBlock=function(t,e){return null==t&&(t=null),null==e&&(e=null),null!==t&&(this.blocks[this.pos][2]=t),null!==e&&(this.blocks[this.pos][3]=e),this},e.prototype.backBlock=function(t,e,n){var s;return null==n&&(n=null),this.pos<0?this.startBlock(e,0,n):(s=this.blocks[this.pos][2],this.blocks[this.pos][2]=s-t,n=[e,s-t+1,s,n],this.blocks[this.pos][1]<=this.blocks[this.pos][2]?(this.pos+=1,this.blocks.push(n)):this.blocks[this.pos]=n,this.current=e,this)},e.prototype.combineBlock=function(){var t,e;return this.pos<1||(e=this.blocks[this.pos-1].slice(0),t=this.blocks[this.pos].slice(0),e[2]=t[2],this.blocks[this.pos-1]=e,this.current=e[0],this.blocks=this.blocks.slice(0,-1),--this.pos),this},t=e,"undefined"!=typeof module&&null!==module?module.exports=t:"undefined"!=typeof window&&null!==window&&(window.HyperDown=t)}).call(this); \ No newline at end of file +(function(){var t,k,s,g,d,c,B,$,f,b=[].slice;function e(){this.commonWhiteList="kbd|b|i|strong|em|sup|sub|br|code|del|a|hr|small",this.blockHtmlTags="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|svg|script|noscript",this.specialWhiteList={table:"table|tbody|thead|tfoot|tr|td|th"},this.hooks={},this.html=!1,this.line=!1,this.blockParsers=[["code",10],["shtml",20],["pre",30],["ahtml",40],["shr",50],["list",60],["math",70],["html",80],["footnote",90],["definition",100],["quote",110],["table",120],["sh",130],["mh",140],["dhr",150],["default",9999]],this.parsers={}}f=function(t){return t.charAt(0).toUpperCase()+t.substring(1)},c=function(t){return t.replace(/[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},d="A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",B=function(t,e,n){var s,r,l,i,o,a;if(t instanceof Array)if(e instanceof Array)for(s=r=0,i=t.length;r/g,">").replace(/"/g,""")},$=function(t,e){var n,s,r,l,i;if(null==e&&(e=null),null==e)return t.replace(/^\s*/,"").replace(/\s*$/,"");for(i="",s=r=0,l=e.length-1;0<=l?r<=l:l<=r;s=0<=l?++r:--r)n=e[s],i+=c(n);return i="["+i+"]*",t.replace(new RegExp("^"+i),"").replace(new RegExp(i+"$"),"")},k=function(t){var e,n,s,r=[];if(t instanceof Array)for(n=e=0,s=t.length;e"+g(t[3])+"")}))).replace(/(^|[^\\])(\$+)(.+?)\2/gm,(l=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return t[1]+l.makeHolder(t[2]+g(t[3])+t[2])}))).replace(/\\(.)/g,(i=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=t[1].match(/^[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]$/)?"":"\\",t=g(t[1]);return t=t.replace(/\$/g,"$"),i.makeHolder(e+t)}))).replace(/<(https?:\/\/.+)>/gi,(o=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=o.cleanUrl(t[1]),t=o.call("parseLink",t[1]);return o.makeHolder(''+t+"")}))).replace(/<(\/?)([a-z0-9-]+)(\s+[^>]*)?>/gi,(a=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return a.html||0<=("|"+a.commonWhiteList+"|"+e+"|").indexOf("|"+t[2].toLowerCase()+"|")?a.makeHolder(t[0]):a.makeHolder(g(t[0]))})),this.html&&(t=t.replace(//g,(c=this,function(){var t=1<=arguments.length?b.call(arguments,0):[];return c.makeHolder(t[0])}))),t=(t=(t=(t=(t=(t=B(["<",">"],["<",">"],t)).replace(/\[\^((?:[^\]]|\\\]|\\\[)+?)\]/g,(h=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=h.footnotes.indexOf(t[1]);return e<0&&(e=h.footnotes.length+1,h.footnotes.push(h.parseInline(t[1],"",!1))),h.makeHolder(''+e+"")}))).replace(/!\[((?:[^\]]|\\\]|\\\[)*?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,(p=this,function(){var t=1<=arguments.length?b.call(arguments,0):[],e=g(p.escapeBracket(t[1])),t=p.escapeBracket(t[2]);return t=p.cleanUrl(t),p.makeHolder('"+n+""},e.prototype.parsePre=function(t,e,n){return t=t.map(function(t){return g(t.substring(4))}),(n=this.markLines(t,n).join("\n")).match(/^\s*$/)?"":""+n+""},e.prototype.parseAhtml=function(t,e,n){return $(this.markLines(t,n).join("\n"))},e.prototype.parseShtml=function(t,e,n){return $(this.markLines(t.slice(1,-1),n+1).join("\n"))},e.prototype.parseMath=function(t,e,n,s){return""+this.markLine(n,s)+g(t.join("\n"))+"
"},e.prototype.parseSh=function(t,e,n,s){t=this.markLine(n,s)+this.parseInline($(t[0],"# "));return t.match(/^\s*$/)?"":""+this.parse(t,!0,n)+""},e.prototype.parseList=function(t,e,n){for(var s,r,l,i,o,a,c,h,p,u,f,k,m="",g=99999,d=99999,B=!1,b=!1,y=[],v=s=0,$=t.length;s<$;v=++s)(h=(c=t[v]).match(/^(\s*)((?:[0-9]+\.?)|\-|\+|\*)(\s+)(.*)$/i))?(u=h[1].length,k=0<="+-*".indexOf(h[2])?"ul":"ol",g=Math.min(u,g),B=!0,0"+this.parse(i.join("\n"),!0,n+o)+""),l!==k&&(l&&(m+=""+l+">"),m+="<"+k+">"),o=v,i=[f],l=k)):i.push(p.replace(new RegExp("^\\s{"+d+"}"),""));return 0
")).replace(/\n/g,"
")).match(/^\s*$/)?"":e?t:"
"+t+"
"},e.prototype.parseFootnote=function(t,e){e[0];var e=e[1],e=this.footnotes.indexOf(e);return 0<=e&&((t=t.slice(0))[0]=t[0].replace(/^\[\^((?:[^\]]|\]|\[)+?)\]:/,""),this.footnotes[e]=t),""},e.prototype.parseDefinition=function(){return""},e.prototype.parseHtml=function(t,e,n){var s;return t=t.map((s=this,function(t){return s.parseInline(t,null!=s.specialWhiteList[e]?s.specialWhiteList[e]:"")})),this.markLines(t,n).join("\n")},e.prototype.cleanUrl=function(t){var e=new RegExp("^\\s*((http|https|ftp|mailto):["+d+"_a-z0-9-:\\.\\*/%#;!@\\?\\[\\]\\+=~\\|\\,&\\(\\)]+)","i"),n=new RegExp("^\\s*(["+d+"_a-z0-9-:\\.\\*/%#!@\\?\\+=~\\|\\,&]+)","i");return(e=t.match(e))||(e=t.match(n))?e[1]:"#"},e.prototype.escapeBracket=function(t){return B(["\\[","\\]","\\(","\\)"],["[","]","(",")"],t)},e.prototype.startBlock=function(t,e,n){return null==n&&(n=null),this.pos+=1,this.current=t,this.blocks.push([t,e,e,n]),this},e.prototype.endBlock=function(){return this.current="normal",this},e.prototype.isBlock=function(t,e){return null==e&&(e=null),this.current===t&&(null===e||this.blocks[this.pos][3]===e)},e.prototype.getBlock=function(){return null!=this.blocks[this.pos]?this.blocks[this.pos]:null},e.prototype.setBlock=function(t,e){return null==t&&(t=null),null==e&&(e=null),null!==t&&(this.blocks[this.pos][2]=t),null!==e&&(this.blocks[this.pos][3]=e),this},e.prototype.backBlock=function(t,e,n){var s;return null==n&&(n=null),this.pos<0?this.startBlock(e,0,n):(s=this.blocks[this.pos][2],this.blocks[this.pos][2]=s-t,n=[e,s-t+1,s,n],this.blocks[this.pos][1]<=this.blocks[this.pos][2]?(this.pos+=1,this.blocks.push(n)):this.blocks[this.pos]=n,this.current=e,this)},e.prototype.combineBlock=function(){var t,e;return this.pos<1||(e=this.blocks[this.pos-1].slice(0),t=this.blocks[this.pos].slice(0),e[2]=t[2],this.blocks[this.pos-1]=e,this.current=e[0],this.blocks=this.blocks.slice(0,-1),--this.pos),this},t=e,"undefined"!=typeof module&&null!==module?module.exports=t:"undefined"!=typeof window&&null!==window&&(window.HyperDown=t)}).call(this); \ No newline at end of file diff --git a/admin/src/js/hyperdown.js b/admin/src/js/hyperdown.js index c3ce2255..15969d10 100644 --- a/admin/src/js/hyperdown.js +++ b/admin/src/js/hyperdown.js @@ -409,7 +409,7 @@ text = this.parseInlineCallback(text); text = text.replace(/<([_a-z0-9-\.\+]+@[^@]+\.[a-z]{2,})>/ig, '$1'); if (enableAutoLink) { - regex = new RegExp("(^|[^\"])((https?):[" + pL + "_0-9-\\./%#!@\\?\\+=~\\|\\,&\\(\\)]+)($|[^\"])", 'ig'); + regex = new RegExp("(^|[^\"])((https?):[" + pL + "_0-9-\\./%#!@\\?\\[\\]\\+=~\\|\\,&\\(\\)]+)($|[^\"])", 'ig'); text = text.replace(regex, (function(_this) { return function() { var link, matches; @@ -1164,7 +1164,7 @@ Parser.prototype.cleanUrl = function(url) { var matches, regexUrl, regexWord; - regexUrl = new RegExp("^\\s*((http|https|ftp|mailto):[" + pL + "_a-z0-9-:\\.\\*/%#;!@\\?\\+=~\\|\\,&\\(\\)]+)", 'i'); + regexUrl = new RegExp("^\\s*((http|https|ftp|mailto):[" + pL + "_a-z0-9-:\\.\\*/%#;!@\\?\\[\\]\\+=~\\|\\,&\\(\\)]+)", 'i'); regexWord = new RegExp("^\\s*([" + pL + "_a-z0-9-:\\.\\*/%#!@\\?\\+=~\\|\\,&]+)", 'i'); if (!!(matches = url.match(regexUrl))) { return matches[1]; diff --git a/var/HyperDown.php b/var/HyperDown.php index 21a7d003..374fa4f3 100644 --- a/var/HyperDown.php +++ b/var/HyperDown.php @@ -385,8 +385,8 @@ class HyperDown "/(^|[^\\\])(`+)(.+?)\\2/", function ($matches) use ($self) { return $matches[1] . $self->makeHolder( - '' . htmlspecialchars($matches[3]) . ''
- );
+ '' . htmlspecialchars($matches[3]) . ''
+ );
},
$text
);
@@ -396,8 +396,8 @@ class HyperDown
"/(^|[^\\\])(\\$+)(.+?)\\2/",
function ($matches) use ($self) {
return $matches[1] . $self->makeHolder(
- $matches[2] . htmlspecialchars($matches[3]) . $matches[2]
- );
+ $matches[2] . htmlspecialchars($matches[3]) . $matches[2]
+ );
},
$text
);
@@ -433,8 +433,8 @@ class HyperDown
"/<(\/?)([a-z0-9-]+)(\s+[^>]*)?>/i",
function ($matches) use ($self, $whiteList) {
if ($self->_html || false !== stripos(
- '|' . $self->_commonWhiteList . '|' . $whiteList . '|', '|' . $matches[2] . '|'
- )) {
+ '|' . $self->_commonWhiteList . '|' . $whiteList . '|', '|' . $matches[2] . '|'
+ )) {
return $self->makeHolder($matches[0]);
} else {
return $self->makeHolder(htmlspecialchars($matches[0]));
@@ -1071,7 +1071,7 @@ class HyperDown
private function parseBlockMh($block, $key, $line, &$state, $lines)
{
if (preg_match("/^\s*((=|-){2,})\s*$/", $line, $matches)
- && ($block && $block[0] == "normal" && !preg_match("/^\s*$/", $lines[$block[2]]))) { // check if last line isn't empty
+ && ($block && $block[0] == "normal" && !preg_match("/^\s*$/", $lines[$block[2]]))) { // check if last line isn't empty
if ($this->isBlock('normal')) {
$this->backBlock(1, 'mh', $matches[1][0] == '=' ? 1 : 2)
->setBlock($key)
@@ -1652,7 +1652,7 @@ class HyperDown
*/
public function cleanUrl($url)
{
- if (preg_match("/^\s*((http|https|ftp|mailto):[\p{L}_a-z0-9-:\.\*\/%#;!@\?\+=~\|\,&\(\)]+)/iu", $url, $matches)) {
+ if (preg_match("/^\s*((http|https|ftp|mailto):[\p{L}_a-z0-9-:\.\*\/%#;!@\?\+=~\|\,&\(\)\[\]]+)/iu", $url, $matches)) {
return $matches[1];
} else if (preg_match("/^\s*([\p{L}_a-z0-9-:\.\*\/%#!@\?\+=~\|\,&]+)/iu", $url, $matches)) {
return $matches[1];
@@ -1794,4 +1794,3 @@ class HyperDown
return $this;
}
}
-