Skip to content

Commit 1a3fa9e

Browse files
committed
Fix RT 49038: Doc bug - escaping
1 parent d398d9c commit 1a3fa9e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,16 @@ CONSTRUCTOR
279279
then &, < and > (and " within attribute values) will be converted into
280280
the corresponding XML entity, although & will not be converted if it
281281
looks like it could be part of a valid entity (but see below). If the
282-
value is 'unescaped', then the escaping will be turned off character-by-
283-
character if the character in question is preceded by a backslash, or
284-
for the entire string if it is supplied as a scalar reference. So, for
285-
example,
282+
value is 'unescaped', then the escaping will be turned off
283+
character-by-character if the character in question is preceded by a
284+
backslash, or for the entire string if it is supplied as a scalar
285+
reference. So, for example,
286286

287287
use XML::Generator escape => 'always';
288288

289289
one('<'); # <one>&lt;</one>
290290
two('\&'); # <two>\&amp;</two>
291-
three(\'>'); # <three>&gt;</three> (scalar refs always allowed)
291+
three(\'<f>'); # <three><f></three> (scalar refs always allowed)
292292
four('&lt;'); # <four>&lt;</four> (looks like an entity)
293293
five('&#34;'); # <five>&#34;</five> (looks like an entity)
294294

@@ -298,7 +298,7 @@ CONSTRUCTOR
298298

299299
one('<'); # <one>&lt;</one>
300300
two('\&'); # <two>&</two>
301-
three(\'>'); # <three>></three> (aiee!)
301+
three(\'<f>');# <three><f></three> (scalar refs always allowed)
302302
four('&lt;'); # <four>&amp;lt;</four> (no special case for entities)
303303

304304
By default, high-bit data will be passed through unmodified, so that

lib/XML/Generator.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,15 @@ characters escaped if this option is supplied. If the value is 'always',
295295
then &, < and > (and " within attribute values) will be converted into
296296
the corresponding XML entity, although & will not be converted if it looks
297297
like it could be part of a valid entity (but see below). If the value is
298-
'unescaped', then the escaping will be turned off character-by- character
298+
'unescaped', then the escaping will be turned off character-by-character
299299
if the character in question is preceded by a backslash, or for the
300300
entire string if it is supplied as a scalar reference. So, for example,
301301
302302
use XML::Generator escape => 'always';
303303
304304
one('<'); # <one>&lt;</one>
305305
two('\&'); # <two>\&amp;</two>
306-
three(\'>'); # <three>&gt;</three> (scalar refs always allowed)
306+
three(\'<f>'); # <three><f></three> (scalar refs always allowed)
307307
four('&lt;'); # <four>&lt;</four> (looks like an entity)
308308
five('&#34;'); # <five>&#34;</five> (looks like an entity)
309309
@@ -313,7 +313,7 @@ but
313313
314314
one('<'); # <one>&lt;</one>
315315
two('\&'); # <two>&</two>
316-
three(\'>'); # <three>></three> (aiee!)
316+
three(\'<f>');# <three><f></three> (scalar refs always allowed)
317317
four('&lt;'); # <four>&amp;lt;</four> (no special case for entities)
318318
319319
By default, high-bit data will be passed through unmodified, so that

0 commit comments

Comments
 (0)