diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-05-28 16:49:12 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-05-28 16:49:12 -0400 |
commit | 91c1a2943badc32b521acd5cc933a236ca6f5c0f (patch) | |
tree | 712f5ca55e28314d4758ff7680b887a0cda1f24c /include/bb2diaspora.php | |
parent | 24f5e6b3f3f1f29cce8923c38fbdfb24fa5ed5a5 (diff) | |
parent | 6962989e52f0ce442fbb3e59992eeb528faa12da (diff) | |
download | volse-hubzilla-91c1a2943badc32b521acd5cc933a236ca6f5c0f.tar.gz volse-hubzilla-91c1a2943badc32b521acd5cc933a236ca6f5c0f.tar.bz2 volse-hubzilla-91c1a2943badc32b521acd5cc933a236ca6f5c0f.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
slackr - tone down the shadows a smidgin
add plugin hooks to gender, sexpref, and marital selectors
birthday in november,december bug
rework the way private photos are embedded to avoid url differences and also check the permissions if possible to make sure that nothing sneaks by.
handle multiple underscores in D* links
* master:
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r-- | include/bb2diaspora.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 8487f845a..d86ba4543 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -221,13 +221,18 @@ function bb2diaspora($Text,$preserve_nl = false) { $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text); - $Text = preg_replace('/\[(.*?)\]\((.*?)\\\\_(.*?)\)/ism','[$1]($2_$3)',$Text); + $Text = preg_replace_callback('/\[(.*?)\]\((.*?)\)/ism','unescape_underscores_in_links',$Text); call_hooks('bb2diaspora',$Text); return $Text; } +function unescape_underscores_in_links($m) { + $y = str_replace('\\_','_', $m[2]); + return('[' . $m[1] . '](' . $y . ')'); +} + function format_event_diaspora($ev) { $a = get_app(); |