<html>
<head>
<title>Some tests for Embperl escaping</title>
</head>
<body>
Here it starts with some HTML Text<P>
First of all assign a value:
<BR>
Now we have some 'Umlaute':
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) äöüäöü???<&+ <BR>
What is the EscMode? 3
Now a Url: <A HREF="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521">Here it goes</A>
A Tag 2: <A HREF="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" TARGET="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? & + - %21">a2</A>
A Tag 3: <A TARGET="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? & + - %21" HREF="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" TARGET="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? & + - %21">a3</A>
A Tag 4: <A TARGET="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? & + - %21" HREF="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521">a4</A>
A Tag 5: <A TARGET="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? & + - %21">a5</A>
A Tag 6: <A >a6</A>
A Tag 7: <A HREF="7">x</A>
A Tag 8: <A TARGET=8 HREF="8">x</A>
A Tag 9: <A HREF="9" TARGET="9">x</A>
A Tag 10: <A TARGET="10" HREF="10" TARGET="10">x</A>
A Tag 11: <A HREF="11" >x</A>
A Tag 12: <A HREF=12>x</A>
A Tag 13: <A HREF="abcd%20>">x</A>
A Tag 14: <A HREF="abcd%20>">x</A>
FRAME: <FRAME SRC="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" name="%20foo">
IFRAME: <IFRAME SRC="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" name="%20foo">
EMBED: <EMBED SRC="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" name="%20foo">
LAYER: <LAYER SRC="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" name="%20foo">
IMG: <IMG SRC="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" name="%20foo">
FORM: <FORM action="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" name="%20foo">
Hash in A <A HREF="http://localhost/tests?A=1&B=2">
Array in A <A HREF="http://localhost/tests?X=9&Y=8&Z=7">
1
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) äöüäöü???<&+ <BR>
What is the EscMode? 1
Now a Url: <A HREF="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? & + - %21">Here it goes</A>
2
Now lets look what we are getting from this:<BR>
(this+is+the+value+in+$a) (this+is+the+value+in+$a)+äöüäöü%3F%3F%3F<%26%2B++<BR>
What is the EscMode? 2
Now a Url: <A HREF="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521">Here it goes</A>
0
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) äöüäöü???<&+ <BR>
What is the EscMode? 0
Now a Url: <A HREF="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? & + - %21">Here it goes</A>
3
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) äöüäöü???<&+ <BR>
What is the EscMode? 3
Now a Url: <A HREF="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521">Here it goes</A>
What is the EscMode? 3
file.html?name=abcd&data=xyz
Now we localy set $escmode:<BR>
(this is the value in $a) äöüäöü???<&+ <BR>
(this is the value in $a) äöüäöü???<&+ <BR>
(this+is+the+value+in+$a)+äöüäöü%3F%3F%3F<%26%2B++<BR>
(this is the value in $a) äöüäöü???<&+ <BR>
0
<A HREF='http://host/script?name=My+Name+öäü'>
<A HREF='http://host/script?name=My+Name+öäü'>
0
<A HREF='http://host/script?name=My+Name+öäü'>
<A HREF='http://host/script?name=My Name öäü'>
<br>
We can avoid interpreting [- foo -] with a double [[ <br>
This should also work for [* foo *] <br>
<A HREF="abcd%20>">x</A>
<table>
<TR>
<TD><a href="1">Link</a></TD>
</TR>
<TR>
<TD><a href="2">Link</a></TD>
</TR>
<TR>
<TD><a href="3">Link</a></TD>
</TR>
</table>
<table>
<TR>
<TD><a href="1">Link</a></TD>
</TR>
<TR>
<TD><a href="2">Link</a></TD>
</TR>
<TR>
<TD><a href="3">Link</a></TD>
</TR>
</table>
$optRawInput 0
$escmode 0
'here is a \ ' -> here is a \
'here is a \\ ' -> here is a \
'here is a \\\ ' -> here is a \\
'here is a \\\\ ' -> here is a \\
'here is a <tag> ' -> here is a
'here is a \<tag> ' -> here is a <tag>
'here is a \\<tag> ' -> here is a \<tag>
'here is a \\\<tag> ' -> here is a \<tag>
'here is a \\\\<tag> ' -> here is a \\<tag>
'here is a \<tag\> ' -> here is a <tag\>
'here is a \\<tag\\> ' -> here is a \<tag\>
'here is a \\\<tag\\\> ' -> here is a \<tag\\>
'here is a \\\\<tag\\\\> ' -> here is a \\<tag\\>
$optRawInput 1
$escmode 0
'here is a \ ' -> here is a \
'here is a \\ ' -> here is a \
'here is a \\\ ' -> here is a \\
'here is a \\\\ ' -> here is a \\
'here is a <tag> ' -> here is a <tag>
'here is a \<tag> ' -> here is a \<tag>
'here is a \\<tag> ' -> here is a \<tag>
'here is a \\\<tag> ' -> here is a \\<tag>
'here is a \\\\<tag> ' -> here is a \\<tag>
'here is a \<tag\> ' -> here is a \<tag\>
'here is a \\<tag\\> ' -> here is a \<tag\>
'here is a \\\<tag\\\> ' -> here is a \\<tag\\>
'here is a \\\\<tag\\\\> ' -> here is a \\<tag\\>
$optRawInput 0
$escmode 1
'here is a \ ' -> here is a
'here is a \\ ' -> here is a
'here is a \\\ ' -> here is a \
'here is a \\\\ ' -> here is a \
'here is a <tag> ' -> here is a
'here is a \<tag> ' -> here is a <tag>
'here is a \\<tag> ' -> here is a <tag>
'here is a \\\<tag> ' -> here is a <tag>
'here is a \\\\<tag> ' -> here is a \<tag>
'here is a \<tag\> ' -> here is a <tag>
'here is a \\<tag\\> ' -> here is a <tag>
'here is a \\\<tag\\\> ' -> here is a <tag\>
'here is a \\\\<tag\\\\> ' -> here is a \<tag\>
$optRawInput 1
$escmode 1
'here is a \ ' -> here is a
'here is a \\ ' -> here is a
'here is a \\\ ' -> here is a \
'here is a \\\\ ' -> here is a \
'here is a <tag> ' -> here is a <tag>
'here is a \<tag> ' -> here is a <tag>
'here is a \\<tag> ' -> here is a <tag>
'here is a \\\<tag> ' -> here is a \<tag>
'here is a \\\\<tag> ' -> here is a \<tag>
'here is a \<tag\> ' -> here is a <tag>
'here is a \\<tag\\> ' -> here is a <tag>
'here is a \\\<tag\\\> ' -> here is a \<tag\>
'here is a \\\\<tag\\\\> ' -> here is a \<tag\>
<P>Ok.<P>
</body>
</html>