summaryrefslogtreecommitdiffabout
path: root/include/opkele
authorMichael Krelin <hacker@klever.net>2008-02-02 10:50:48 (UTC)
committer Michael Krelin <hacker@klever.net>2008-02-02 10:50:48 (UTC)
commitb7ce9a84f0775eb24f0a27d3816bf57b774a2927 (patch) (unidiff)
tree77d3bf4830e9d45824bc466c7e1b5279f3ff1111 /include/opkele
parentf29ad6501686e5f43b536258b86d12683c711f02 (diff)
downloadlibopkele-b7ce9a84f0775eb24f0a27d3816bf57b774a2927.zip
libopkele-b7ce9a84f0775eb24f0a27d3816bf57b774a2927.tar.gz
libopkele-b7ce9a84f0775eb24f0a27d3816bf57b774a2927.tar.bz2
added util::attr_escape
escaping string for inclusion into x(ht)ml attributes Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'include/opkele') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/opkele/util.h b/include/opkele/util.h
index 6f3ddf6..719f951 100644
--- a/include/opkele/util.h
+++ b/include/opkele/util.h
@@ -97,12 +97,19 @@ namespace opkele {
97 * @return encoded string 97 * @return encoded string
98 * @throw failed_conversion in case of failure 98 * @throw failed_conversion in case of failure
99 */ 99 */
100 string url_encode(const string& str); 100 string url_encode(const string& str);
101 101
102 /** 102 /**
103 * Make string suitable for using as x(ht)ml attribute.
104 * @param str string to escape
105 * @return escaped string
106 */
107 string attr_escape(const string& str);
108
109 /**
103 * Convert number to string 110 * Convert number to string
104 * @param l number 111 * @param l number
105 * @return string representation 112 * @return string representation
106 * @throw failed_conversion in case of failure 113 * @throw failed_conversion in case of failure
107 */ 114 */
108 string long_to_string(long l); 115 string long_to_string(long l);