Skip to content

Commit b6747d9

Browse files
author
Christophe Jaillet
committed
Do not forget to escape characters in the documentation of functions that escape characters, otherwise they look as no-op :)
Backport of 1839186 from trunk git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1839187 13f79535-47bb-0310-9956-ffa450edef68
1 parent e6434e8 commit b6747d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/apr_escape.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ APR_DECLARE(const char *) apr_pescape_urlencoded(apr_pool_t *p,
236236

237237
/**
238238
* Apply entity encoding to a string. Characters are replaced as follows:
239-
* '<' becomes '&lt;', '>' becomes '&gt;', '&' becomes '&amp;', the
240-
* double quote becomes '&quot;" and the single quote becomes '&apos;'.
239+
* '<' becomes '\&lt;', '>' becomes '\&gt;', '&' becomes '\&amp;', the
240+
* double quote becomes '\&quot;" and the single quote becomes '\&apos;'.
241241
*
242242
* If toasc is not zero, any non ascii character will be encoded as
243243
* '%\#ddd;', where ddd is the decimal code of the character.
@@ -255,9 +255,9 @@ APR_DECLARE(apr_status_t) apr_escape_entity(char *escaped, const char *str,
255255

256256
/**
257257
* Apply entity encoding to a string, returning the result from a pool.
258-
* Characters are replaced as follows: '<' becomes '&lt;', '>' becomes
259-
* '&gt;', '&' becomes '&amp;', the double quote becomes '&quot;" and the
260-
* single quote becomes '&apos;'.
258+
* Characters are replaced as follows: '<' becomes '\&lt;', '>' becomes
259+
* '\&gt;', '&' becomes '\&amp;', the double quote becomes '\&quot;" and the
260+
* single quote becomes '\&apos;'.
261261
* @param p Pool to allocate from
262262
* @param str The original string
263263
* @param toasc If non zero, encode non ascii characters

0 commit comments

Comments
 (0)