Skip to content

Commit ccf08d6

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 resp. 1839187 from 1.7.x git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1839188 13f79535-47bb-0310-9956-ffa450edef68
1 parent 872b922 commit ccf08d6

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
@@ -223,8 +223,8 @@ APR_DECLARE(const char *) apr_pescape_urlencoded(apr_pool_t *p,
223223

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

243243
/**
244244
* Apply entity encoding to a string, returning the result from a pool.
245-
* Characters are replaced as follows: '<' becomes '&lt;', '>' becomes
246-
* '&gt;', '&' becomes '&amp;', the double quote becomes '&quot;" and the
247-
* single quote becomes '&apos;'.
245+
* Characters are replaced as follows: '<' becomes '\&lt;', '>' becomes
246+
* '\&gt;', '&' becomes '\&amp;', the double quote becomes '\&quot;" and the
247+
* single quote becomes '\&apos;'.
248248
* @param p Pool to allocate from
249249
* @param str The original string
250250
* @param toasc If non zero, encode non ascii characters

0 commit comments

Comments
 (0)