[geeklog-cvs] geeklog: for the What's Related block, only apply COM_checkWords...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Sep 25 03:35:52 EDT 2011
changeset 8421:bfae16aa3972
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/bfae16aa3972
user: Dirk Haun <dirk at haun-online.de>
date: Sun Sep 25 09:26:09 2011 +0200
description:
for the What's Related block, only apply COM_checkWords() on the link text (for bug #0001393)
diffstat:
system/lib-story.php | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r 5e8ea88b67b7 -r bfae16aa3972 system/lib-story.php
--- a/system/lib-story.php Sat Sep 24 20:21:29 2011 +0200
+++ b/system/lib-story.php Sun Sep 25 09:26:09 2011 +0200
@@ -597,7 +597,13 @@
}
foreach ($rel as &$value) {
- $value = COM_checkWords($value);
+ if (preg_match("/<a[^>]*href=[\"']([^\"']*)[\"'][^>]*>(.*?)<\/a>/i",
+ $value, $matches) === 1) {
+ $value = '<a href="' . $matches[1] . '">'
+ . COM_checkWords($matches[2]) . '</a>';
+ } else {
+ $value = COM_checkWords($value);
+ }
}
if( !COM_isAnonUser() || (( $_CONF['loginrequired'] == 0 ) &&
More information about the geeklog-cvs
mailing list