Skip to content

Commit

Permalink
if indexOf('data-') == -1, bypass html5 rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
turnermm committed May 5, 2019
1 parent c015f21 commit cb40da9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions action/meta.php
Expand Up @@ -725,12 +725,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
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions script.js
Expand Up @@ -77,11 +77,14 @@ var HTMLParser_Elements = new Array();
}
);
/* 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 ];
};
Expand Down
2 changes: 1 addition & 1 deletion scripts/script-cmpr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cb40da9

Please sign in to comment.