Mailinglist Archive: yast-commit (595 mails)

< Previous Next >
[yast-commit] r53892 - in /trunk/storage/libstorage/src: AppUtil.cc AppUtil.h
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Thu, 04 Dec 2008 16:57:00 -0000
  • Message-id: <20081204165700.9F3BFB1A45@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Thu Dec 4 17:57:00 2008
New Revision: 53892

URL: http://svn.opensuse.org/viewcvs/yast?rev=53892&view=rev
Log:
- added function to escape html stuff (bnc #450496)

Modified:
trunk/storage/libstorage/src/AppUtil.cc
trunk/storage/libstorage/src/AppUtil.h

Modified: trunk/storage/libstorage/src/AppUtil.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.cc?rev=53892&r1=53891&r2=53892&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.cc (original)
+++ trunk/storage/libstorage/src/AppUtil.cc Thu Dec 4 17:57:00 2008
@@ -533,6 +533,18 @@
}


+string escapeHtml(const string& str)
+{
+ string ret = str;
+ boost::replace_all(ret, "&", "&amp;");
+ boost::replace_all(ret, "<", "&lt;");
+ boost::replace_all(ret, ">", "&gt;");
+ boost::replace_all(ret, "\"", "&quot;");
+ boost::replace_all(ret, "'", "&apos;");
+ return ret;
+}
+
+
string sformat(const char* format, ...)
{
char* result;

Modified: trunk/storage/libstorage/src/AppUtil.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.h?rev=53892&r1=53891&r2=53892&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.h (original)
+++ trunk/storage/libstorage/src/AppUtil.h Thu Dec 4 17:57:00 2008
@@ -47,6 +47,8 @@
bool isNfsDev( const string& dev );
unsigned getMajorDevices( const string& driver );

+string escapeHtml(const string& str);
+

template<class StreamType>
void classic(StreamType& stream)

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages