Embperl

 view release on metacpan or  search on metacpan

test/cmp/escape.htm  view on Meta::CPAN

<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) &auml;&ouml;&uuml;&auml;&ouml;&uuml;???&lt;&amp;+  <BR>

What is the EscMode? 7
Let's set the EscMode to 3
What is the EscMode now? 3
Now a Url: <a href="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521">Here it goes</A>
A Tag 2:   <a href="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"  TARGET="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? &amp; + - %21">a2</A>
A Tag 3:   <a TARGET="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? &amp; + - %21" href="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"  TARGET="http://localh...
A Tag 4:   <a TARGET="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? &amp; + - %21" href="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521">a4</A>
A Tag 5:   <a TARGET="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? &amp; + - %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 12b: <a href="12b">x</A>
A Tag 13:  <a href="abcd%20%3E">x</A>
A Tag 14:  <a href="abcd%20%3E">x</A>
FRAME:	   <frame src="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"   name="%20foo">
IFRAME:    <iframe src="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"  name="%20foo">
EMBED:     <embed src="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"   name="%20foo">
LAYER:	   <layer src="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"   name="%20foo">
IMG:	   <img src="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"     name="%20foo">
FORM:	   <form action="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521"     name="%20foo">

^Hash in  A <a href=\"http:\/\/localhost\/tests\?(A=1\&amp;B=2|B=2\&amp;A=1)\">
^Array in A <a href=\"http:\/\/localhost\/tests\?(X=9|Y=8|Z=7)\&amp;(X=9|Y=8|Z=7)\&amp;(X=9|Y=8|Z=7)\">

^Hash in  H <a href=\"http:\/\/localhost\/tests\?(A=1\&amp;B=2|B=2\&amp;A=1)\">
^Array in H <a href=\"http\:\/\/localhost\/tests\?(X=9|Y=8|Z=7)\&amp;(X=9|Y=8|Z=7)\&amp;(X=9|Y=8|Z=7)\">


^<a href=\"tst.html\?(par1=1|par2=2)&amp;(par1=1|par2=2)\">1<\/a>
^<a href=\"tst.html\?(par1=1&amp;par2=2&amp;par3=3|par2=2&amp;par1=1&amp;par3=3|par2=2&amp;par3=3&amp;par1=1|par1=1&amp;par3=3&amp;par2=2|par3=3&amp;par2=2&amp;par1=1|par3=3&amp;par1=1&amp;par2=2)\">2<\/a>
^<a href=\"tst.html\?(par1=1&amp;par2=2|par2=2&amp;par1=1)\">3</a>
^<a href=\"tst.html\?(par1=1&amp;par2=2&amp;par3=3|par2=2&amp;par1=1&amp;par3=3|par2=2&amp;par3=3&amp;par1=1|par1=1&amp;par3=3&amp;par2=2|par3=3&amp;par2=2&amp;par1=1|par3=3&amp;par1=1&amp;par2=2)\">4</a>


		
1
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) &auml;&ouml;&uuml;&auml;&ouml;&uuml;???&lt;&amp;+  <BR>

What is the EscMode? 1
Now a Url: <a href="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This is a text ? &amp; + - %21">Here it goes</A>

2
Now lets look what we are getting from this:<BR>
(this%20is%20the%20value%20in%20%24a) (this%20is%20the%20value%20in%20%24a)%20%E4%F6%FC%E4%F6%FC%3F%3F%3F%3C%26%2B%20%20<BR>

What is the EscMode? 2
Now a Url: <a href="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%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) &auml;&ouml;&uuml;&auml;&ouml;&uuml;???&lt;&amp;+  <BR>

What is the EscMode? 3
Now a Url: <a href="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521">Here it goes</A>

What is the EscMode? 3
15
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) äöüäöü???&lt;&amp;+   &apos;&quot;&lt;&gt;<BR>

What is the EscMode? 15
Now a Url: <a href="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This%20is%20a%20text%20%3F%20%26%20%2B%20-%20%2521 %27%22%3C%3E">Here it goes</A>

What is the EscMode? 15
file.html?name=abcd&amp;data=xyz
Now we localy set $escmode:<BR>
(this is the value in $a) äöüäöü???<&+    \<a><BR>
(this is the value in $a) &auml;&ouml;&uuml;&auml;&ouml;&uuml;???&lt;&amp;+    <a&gt;<BR>
(this%20is%20the%20value%20in%20%24a)%20%E4%F6%FC%E4%F6%FC%3F%3F%3F%3C%26%2B%20%20%20%20<a%3E<BR>



( run in 1.648 second using v1.01-cache-2.11-cpan-71847e10f99 )