[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: www/media/includes
From: Albert Astals Cid <tsdgeos () terra ! es>
Date: 2011-01-09 0:51:58
Message-ID: 20110109005158.EFFC1AC8B0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1213009 by aacid:
strip the cdata of full stories when printing them as html, fixes some of the okular \
news items
M +7 -1 functions.inc
--- trunk/www/media/includes/functions.inc #1213008:1213009
@@ -67,6 +67,12 @@
$current_relativeurl = substr ($current_relativeurl, 1, \
strlen($current_relativeurl)); }
+function strip_cdata ($string)
+{
+ preg_match_all("/<!\[cdata\[(.*?)\]\]>/is", $string, $matches);
+ return str_replace($matches[0], $matches[1], $string);
+}
+
function kde_general_news ($file, $items, $summaryonly)
{
global $site_locale;
@@ -133,7 +139,7 @@
}
else
{
- $printFullstory = i18n_var($fullstory[1]);
+ $printFullstory = strip_cdata(i18n_var($fullstory[1]));
print "<td class=\"newsbox2\"><h3><a name=\"item" . \
preg_replace("@[^a-zA-Z0-9]@", "", $title[1]) . "\">$printDate: \
$printTitle</a></h3></td>\n"; print "</tr><tr><td \
class=\"newsbox2\">$printFullstory</td>\n"; }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic