Commit 542fa4a0 authored by Zot's avatar Zot Committed by Mario
Browse files

more markdown purification

parent 515f1e76
......@@ -77,12 +77,12 @@ class MarkdownSoap {
}
function purify($s) {
$s = str_replace("\n",'<br>',$s);
$s = str_replace("\t",'&nbsp;&nbsp;&nbsp;&nbsp;',$s);
$s = str_replace(' ','&nbsp;',$s);
// $s = str_replace("\n",'<br>',$s);
// $s = str_replace("\t",'&nbsp;&nbsp;&nbsp;&nbsp;',$s);
// $s = str_replace(' ','&nbsp;',$s);
$s = purify_html($s);
$s = str_replace(['&nbsp;', mb_convert_encoding('&#x00a0;','UTF-8','HTML-ENTITIES')], [ ' ', ' ' ],$s);
$s = str_replace(['<br>','<br />', '&lt;', '&gt;' ],["\n","\n", '<', '>'],$s);
// $s = str_replace(['&nbsp;', mb_convert_encoding('&#x00a0;','UTF-8','HTML-ENTITIES')], [ ' ', ' ' ],$s);
// $s = str_replace(['<br>','<br />', '&lt;', '&gt;' ],["\n","\n", '<', '>'],$s);
return $s;
}
......
......@@ -103,8 +103,7 @@
<script>
window.wiki_resource_id = '{{$resource_id}}';
window.wiki_page_name = '{{$page}}';
// window.wiki_page_content = "{{$content|escape:'javascript'}}";
window.wiki_page_content = '{{$content|escape:'quotes'}}';
window.wiki_page_content = '{{$content|escape:'javascript'}}';
window.wiki_page_commit = '{{$commit}}';
$("#generic-modal-ok-{{$wikiModalID}}").removeClass('btn-primary');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment