aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-21 00:40:19 -0700
committerMario Vavti <mario@mariovavti.com>2017-03-29 14:05:12 +0200
commit542fa4a08c3f58d60c729ee166a2c4dc92f7524e (patch)
treebd96ee05e7a939420ea46b31fa9f9c948206f759
parent515f1e76b05c5b4544b7ee624d73cc3b7878d5ea (diff)
downloadvolse-hubzilla-542fa4a08c3f58d60c729ee166a2c4dc92f7524e.tar.gz
volse-hubzilla-542fa4a08c3f58d60c729ee166a2c4dc92f7524e.tar.bz2
volse-hubzilla-542fa4a08c3f58d60c729ee166a2c4dc92f7524e.zip
more markdown purification
-rw-r--r--Zotlabs/Lib/MarkdownSoap.php10
-rw-r--r--view/tpl/wiki.tpl3
2 files changed, 6 insertions, 7 deletions
diff --git a/Zotlabs/Lib/MarkdownSoap.php b/Zotlabs/Lib/MarkdownSoap.php
index e5f3c81dd..a0214bbe4 100644
--- a/Zotlabs/Lib/MarkdownSoap.php
+++ b/Zotlabs/Lib/MarkdownSoap.php
@@ -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;
}
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index 452fd429d..564db3324 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -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');