Permalink
Browse files

[#194] Blank message because of a bug in BBCode URL shortening

  • Loading branch information...
1 parent f206bdc commit 3a63ed6a80e1eb41b11d67797f3b8335e0b9f7c3 @mahagr committed Dec 10, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −0 components/com_kunena/CHANGELOG.php
  2. +1 −1 components/com_kunena/lib/kunena.parser.php
@@ -35,6 +35,7 @@
10-December-2011 Matias
# [#119] Text looking like bbcode becomes empty message
+# [#194] Blank message because of a bug in BBCode URL shortening
24-November-2011 Xillibit
# [#193] All new users are hidden in Kunena
@@ -77,7 +77,7 @@ function PostProcessing(&$task) {
$kunena_config = KunenaFactory::getConfig ();
if ($kunena_config->trimlongurls) {
// shorten URL text if they are too long (>65chars)
- $task->text = preg_replace ( '/<a href=(\"|\')((http(s?):\/\/)?(([^\'\"]{' . $kunena_config->trimlongurlsfront . '})([^\'\"]{4,})([^\'\"]{' . $kunena_config->trimlongurlsback . '})))\1([^>]*)>\3?\5<\/a>/u', '<a href="\2" \9>\6...\8</a>', $task->text );
+ $task->text = preg_replace ( '/<a href=(\"|\')((http(s?):\/\/)?(([^\'\"]{' . $kunena_config->trimlongurlsfront . '})([^\'\"]{4,})([^\'\"]{' . $kunena_config->trimlongurlsback . '})))\1([^>]*)>(http(s?):\/\/)?\5<\/a>/u', '<a href="\2" \9>\6...\8</a>', $task->text );
}
if ($kunena_config->autoembedyoutube) {

0 comments on commit 3a63ed6

Please sign in to comment.