aboutsummaryrefslogtreecommitdiffstats
path: root/include/html2bbcode.php
diff options
context:
space:
mode:
authorhabeascodice <habeascodice@federated.social>2014-10-29 03:39:07 -0700
committerhabeascodice <habeascodice@federated.social>2014-10-29 03:39:07 -0700
commitbc02b933727da7a000d43d2d7d495f066616dc81 (patch)
treee590b70757edb94655872f5b992f143cead61eb3 /include/html2bbcode.php
parentfc12123329133cea39f27615a7c24c57e5b4a35d (diff)
parent7d9f785758ee6e4c19838e532f9930e227e95fc6 (diff)
downloadvolse-hubzilla-bc02b933727da7a000d43d2d7d495f066616dc81.tar.gz
volse-hubzilla-bc02b933727da7a000d43d2d7d495f066616dc81.tar.bz2
volse-hubzilla-bc02b933727da7a000d43d2d7d495f066616dc81.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/html2bbcode.php')
-rw-r--r--include/html2bbcode.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index df430e6c7..9ffc85a82 100644
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -16,7 +16,7 @@ function node2bbcode(&$doc, $oldnode, $attributes, $startbb, $endbb)
function node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb)
{
- $savestart = str_replace('$', '%', $startbb);
+ $savestart = str_replace('$', '\x01', $startbb);
$replace = false;
$xpath = new DomXPath($doc);
@@ -37,7 +37,7 @@ function node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb)
foreach ($attributes as $attribute => $value) {
- $startbb = str_replace('%'.++$i, '$1', $startbb);
+ $startbb = str_replace('\x01'.++$i, '$1', $startbb);
if (strpos('*'.$startbb, '$1') > 0) {
@@ -283,8 +283,9 @@ function html2bbcode($message)
array('[b]', '[/b]', '[i]', '[/i]'), $message);
// Handling Yahoo style of mails
- $message = str_replace('[hr][b]From:[/b]', '[quote][b]From:[/b]', $message);
+ // $message = str_replace('[hr][b]From:[/b]', '[quote][b]From:[/b]', $message);
+ $message = htmlspecialchars($message,ENT_COMPAT,'UTF-8',false);
return(trim($message));
}