I'm changing href attributes with js into something like:
&p1=100&p2=10.....
when html walidator reads page with that, it does not like it.
How to handle that ?
__________________
Found a flower or bug and don't know what it is ? agrozoo.net galery
if you don't spot search button at once, there is search form: agrozoo.net galery search
__________________
Found a flower or bug and don't know what it is ? agrozoo.net galery
if you don't spot search button at once, there is search form: agrozoo.net galery search
The validator will complain, technically correctly, about that &.
inline javascript using XML reserved characters should wrap the program body in CDATA "comments", which will solve the validation issue without junking up the plain text javascript. hard-escaping the reserved chars could cause portability issues.
__________________ my site (updated 5/13) STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.8% IE9:11.4% IE10:6.5%
so, this is not resolved.
Validator does not complain if js generated link contains:
Code:
...?p100=12&selection=1
but cant read selection parameter on server (after link click )then, unless it is :
Code:
?p100=12&selection=1
any suggestion ?
I guess CDATA, cant be used as it comes out as plain text from js.
__________________
Found a flower or bug and don't know what it is ? agrozoo.net galery
if you don't spot search button at once, there is search form: agrozoo.net galery search
Last edited by BubikolRamios; 12-22-2010 at 06:35 PM..
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
result = result.replace("&","//<![CDATA[" + "&" + "//]>");
__________________
Found a flower or bug and don't know what it is ? agrozoo.net galery
if you don't spot search button at once, there is search form: agrozoo.net galery search
Last edited by BubikolRamios; 12-22-2010 at 08:33 PM..
result = result.replace("&","//<![CDATA[" + "&" + "//]>");
That isn't a good thing to do it makes more work for you and may slow down the codes as it will have to replace every & sign why not just do this.
Code:
<script type="text/javascript">
//<![CDATA[
// All your javascript codes here
//]>
</script>
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P
so basicaly, you are saying that ewery js file should have
<![CDATA[ at top and
and
//]>
at bottom ?
What if there is
xxx.innerHTML = "<...."
inside js
will that work ?
__________________
Found a flower or bug and don't know what it is ? agrozoo.net galery
if you don't spot search button at once, there is search form: agrozoo.net galery search
Not in a .js file no only use them comment tags when you put javascript codes on the page itself so only use them on the codes that if you view the source code you can see it, as the validator only obtains the files source code and checks it for errors and them comment tags say this is a comment but still runs the codes between them, if this makes sense to you.
__________________
Official BinPress hand picked coder.
For anyone worried about SQL injection go have a look at my small yet powerful script here.
Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
I am 1 of 65,608 people to get a Pebble Watch :P