编译之前修改的

This commit is contained in:
lealife
2015-05-07 00:13:04 +08:00
parent 1fd6610fa3
commit 12ea17e89f
6 changed files with 11 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -465,7 +465,7 @@ function initEditor() {
// 初始化编辑器 // 初始化编辑器
tinymce.init({ tinymce.init({
inline: true, inline: true,
theme: 'leanote', // theme: 'leanote',
valid_children: "+pre[div|#text|p|span|textarea|i|b|strong]", // ace valid_children: "+pre[div|#text|p|span|textarea|i|b|strong]", // ace
/* /*
protect: [ protect: [

File diff suppressed because one or more lines are too long

View File

@ -1280,8 +1280,14 @@ function setHash(key, value) {
// 防止js注入 // 防止js注入
function trimTitle(title) { function trimTitle(title) {
if(!title) {
return '';
}
return title.replace(/<.*?script.*?>/g, ''); return title.replace(/<.*?script.*?>/g, '');
}; };
function toHtmlEntity(html) { function toHtmlEntity(html) {
if(!html) {
return '';
}
return (html + '').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;'); return (html + '').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}; };

View File

@ -117,4 +117,4 @@
writeScripts(); writeScripts();
})(this); })(this);
// $hash: 8710c7a2ebafb64ccc0c657880497ecf // $hash: bf4894f5e1ef27695549ef4823f74de3