[whatwg] idea about html code security anti xss

Hello,

I had just this idea after reading so much about xss and code injection.

I think there is a simple solution:

1.)
I now invent an attribute called strlen=""

I append this to a <div strlen="94843">htmlcode with strlen of 94843 bytes including whitespace</div>

The browser know knows the exact position where the divtag must end.

You cannot inject some code that closes the tag before.

2.) 
you can now control the code inside the div.
you can also append a second attribute called "secure" that prevents any scriptcode to run from inside the div.


Maybe this idea is not new, or does not work.

Please let me know what you think about this idea.

Christian Gabmeyer 

Received on Tuesday, 15 June 2010 18:19:59 UTC