Skip to content

Commit

Permalink
recover misc_updates branch
Browse files Browse the repository at this point in the history
  • Loading branch information
turnermm committed Nov 14, 2017
1 parent 0af151a commit ad29eae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions action/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ function ckgedit_save_preprocess(Doku_Event $event){
}

$this->replace_entities();
/*Remove urls from linkonly images inserted after second and additional saves, resulting in multiple urls corrupting HTML output */
$TEXT = preg_replace("/\{\{http:\/\/.*?fetch.php\?media=(.*?linkonly.*?)\}\}/",'{{' . "$1" .'}}',$TEXT);
$TEXT = str_replace('< nowiki >', '%%<nowiki>%%',$TEXT);

Expand Down
3 changes: 2 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ var HTMLParser_Elements = new Array();

HTMLParser = this.HTMLParser = function( html, handler ) {
var index, chars, match, stack = [], last = html;

html = html.replace(/~~OPEN_HTML_BLOCK~~/gm , '~~START_HTML_BLOCK~~') ;
html = html.replace(/~~END_HTML_BLOCK~~/gm , '~~CLOSE_HTML_BLOCK~~') ;
if(html.match(/~~START_HTML_BLOCK~~/gm) ){ //adopted [\s\S] from Goyvaerts, Reg. Exp. Cookbook (O'Reilly)
if(!JSINFO['htmlok']) {
html = html.replace(/~~START_HTML_BLOCK~~|~~CLOSE_HTML_BLOCK~~/gm,"");
Expand Down

0 comments on commit ad29eae

Please sign in to comment.