summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormillette <millette@controlyourself.ca>2008-11-14 14:54:57 -0500
committermillette <millette@controlyourself.ca>2008-11-14 14:54:57 -0500
commit0275676931883841bfdc7ffa8779e809f9d39fd3 (patch)
treeb81aeb20bd7e1e1d7fd1838b52aba618ae13f19e
parent1227c9c2c2abda49894a94d26cacb2e73117e15b (diff)
escaping was not needed at all to process short urls. Real fix.
darcs-hash:20081114195457-099f7-45f4f39d5f2eff980d903ca156170576323ec4a7.gz
-rw-r--r--lib/util.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php
index be391c785..6f6d615e5 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -761,12 +761,10 @@ function common_longurl($uri) {
}
function common_shorten_links($text) {
- $r = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
// \s = not a horizontal whitespace character (since PHP 5.2.4)
// RYM this should prevent * preceded URLs from being processed but it its a char
// $r = preg_replace('@[^*](https?://[^)\]>\s]+)@e', "common_shorten_link('\\1')", $r);
- $r = preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
- return $r;
+ return preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $text);
}
function common_shorten_link($long_url) {