literal
append_xml_attribute
xml_escape
)
;
{
my
%attr
= (
foo
=> literal
"<bar"
);
is( xml_escape( \
%attr
)->{foo},
"<bar"
);
append_xml_attribute( \
%attr
,
"foo"
, literal
">baz"
);
is( xml_escape( \
%attr
)->{foo},
"<bar >baz"
);
append_xml_attribute( \
%attr
,
"foo"
,
"<boo"
);
is( xml_escape( \
%attr
)->{foo},
"<bar >baz <boo"
);
}
{
my
%attr
= (
foo
=>
"<bar"
);
is( xml_escape( \
%attr
)->{foo},
"<bar"
);
append_xml_attribute( \
%attr
,
"foo"
,
">baz"
);
is( xml_escape( \
%attr
)->{foo},
"<bar >baz"
);
append_xml_attribute( \
%attr
,
"foo"
, literal
"<boo"
);
is( xml_escape( \
%attr
)->{foo},
"<bar >baz <boo"
);
append_xml_attribute( \
%attr
,
"foo"
,
'"bang'
);
is( xml_escape( \
%attr
)->{foo},
"<bar >baz <boo "bang"
);
}