Skip to content
Permalink
Browse files

Merge pull request #473 from turnermm/html5_err

fixes html5 attributute error in script.js: https://forum.dokuwiki.org/thread/16899
  • Loading branch information...
turnermm committed Jul 11, 2019
2 parents 77c6614 + d62cbd9 commit c2b3c7d0435101ecac5d53f9f60b8e4cb27f980a
Showing with 12 additions and 4 deletions.
  1. +2 −2 action/meta.php
  2. +9 −1 script.js
  3. +1 −1 scripts/script-cmpr.js
@@ -727,12 +727,12 @@ function set_session() {
}
if ($this->dokuwiki_priority && $this->in_dwpriority_group() ) {
if(isset($_COOKIE['FCKG_USE']) && $_COOKIE['FCKG_USE'] == 'other') {
if(isset($_COOKIE['FCKG_USE']) && $_COOKIE['FCKG_USE'] == 'other') { //if other go to ckeditor
$expire = time() -60*60*24*30;
setcookie('FCKG_USE','_false_', $expire, '/');
}
else {
setcookie('FCKG_USE','_false_', $expire, '/');
setcookie('FCKG_USE','_false_', $expire, '/'); //turn off ckeditor
}
}
}
@@ -76,7 +76,15 @@ var HTMLParser_Elements = new Array();
return( '</a>' +sup);
}
);

/* remove html5 attributes */
var pos = html.indexOf('data-');
if(pos != -1) {
html = html.replace(/(<\w+)([^>]+)>/gm,function(match,tag,atts){
atts = atts.replace(/data-[\w\-]+\s*=\s*(\"|\')\w+(\"|\')/,"");
//alert(atts);
return tag + atts+ '>';
});
}
stack.last = function(){
return this[ this.length - 1 ];
};

Some generated files are not rendered by default. Learn more.

0 comments on commit c2b3c7d

Please sign in to comment.
You can’t perform that action at this time.