aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-02 13:49:22 -0700
committerzotlabs <mike@macgirvin.com>2018-05-02 13:49:22 -0700
commit285781b8870d1c36cf90a3b38a448719b8bf9d21 (patch)
tree82fb23e0d82e798d11fabb9bbb0aef0d9e2b91b6 /include
parent7a55ead97db94284146612364b8ce1c59de8771f (diff)
downloadvolse-hubzilla-285781b8870d1c36cf90a3b38a448719b8bf9d21.tar.gz
volse-hubzilla-285781b8870d1c36cf90a3b38a448719b8bf9d21.tar.bz2
volse-hubzilla-285781b8870d1c36cf90a3b38a448719b8bf9d21.zip
hubzilla issue #1151 - activitypub mention gets bookmarked
Diffstat (limited to 'include')
-rw-r--r--include/network.php4
-rw-r--r--include/text.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/network.php b/include/network.php
index 8b7490a8a..a00ede6bf 100644
--- a/include/network.php
+++ b/include/network.php
@@ -797,7 +797,7 @@ function xml2array($contents, $namespaces = true, $get_attributes=1, $priority =
if($namespaces)
$parser = @xml_parser_create_ns("UTF-8",':');
else
- $parser = @xml_parser_create();
+ $parser = @xml_parser_create('UTF-8');
if(! $parser) {
logger('xml2array: xml_parser_create: no resource');
@@ -807,7 +807,7 @@ function xml2array($contents, $namespaces = true, $get_attributes=1, $priority =
xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8");
// http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
- xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
+ xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 0);
@xml_parse_into_struct($parser, trim($contents), $xml_values);
@xml_parser_free($parser);
diff --git a/include/text.php b/include/text.php
index 24f8e1623..dc3a155de 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3313,9 +3313,9 @@ function cleanup_bbcode($body) {
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body);
- $body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
+ $body = preg_replace_callback("/([^\]\='".'"'."\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
+\,\(\)]+)/ismu", '\nakedoembed', $body);
- $body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
+ $body = preg_replace_callback("/([^\]\='".'"'."\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
+\,\(\)]+)/ismu", '\red_zrl_callback', $body);
$body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','\red_unescape_codeblock',$body);