Author: rpmcruz
Date: Sun Jan 13 12:24:05 2008
New Revision: 43570
URL: http://svn.opensuse.org/viewcvs/yast?rev=43570&view=rev
Log:
* src/yzyppwrapper.cc: bug fix: we weren't escaping description text.
Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/yzyppwrapper.cc
Modified: trunk/gtk/ChangeLog
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=43570&r1=43569&r2=43570&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Sun Jan 13 12:24:05 2008
@@ -1,3 +1,7 @@
+2008-01-13 Ricardo Cruz
+
+ * src/yzyppwrapper.cc: bug fix: we weren't escaping description text.
+
2008-01-11 Ricardo Cruz
* src/yzyppwrapper.cc: fixed search: ignore cases.
Modified: trunk/gtk/src/yzyppwrapper.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/yzyppwrapper.cc?rev=43570&r1=43569&r2=43570&view=diff
==============================================================================
--- trunk/gtk/src/yzyppwrapper.cc (original)
+++ trunk/gtk/src/yzyppwrapper.cc Sun Jan 13 12:24:05 2008
@@ -258,15 +258,16 @@
{
ZyppObject object = impl->zyppSel->theObj();
std::string text = object->description(), br = "<br>";
- if (impl->type == PACKAGE_TYPE) {
- // if it has this header, then it is HTML
- const char *header = "<!-- DT:Rich -->", header_len = 16;
- if (!text.compare (0, header_len, header, header_len))
- text.erase (0, header_len);
- else
- // add breakline for every double one...
- YGUtils::replace (text, "\n\n", 2, "<br>");
+ // if it has this header, then it is HTML
+ const char *header = "<!-- DT:Rich -->", header_len = 16;
+ if (!text.compare (0, header_len, header, header_len))
+ text.erase (0, header_len);
+ else {
+ YGUtils::escapeMarkup (text);
+ YGUtils::replace (text, "\n\n", 2, "<br>"); // break every double line
+ }
+ if (impl->type == PACKAGE_TYPE) {
ZyppPackage package = tryCastToZyppPkg (object);
std::string url = package->url(), license = package->license();
if (!url.empty())
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org