Post Reply 
Character '>' in Attribute Values
Nov. 27, 2012, 10:10 AM (This post was last modified: Nov. 27, 2012 12:10 PM by neverwasinparis.)
Post: #1
Character '>' in Attribute Values
in many config sets, also in Sidkis, '[^>]++' is used in pattern filters to find the end of an opening tag. but what about a '>' in an attribute value?
for example:

Code:
<div onclick="A>1 && B()">

'[^>]++' stops after '<div onclick="A' and does not get what we want and could create invalid code.

so why is '[^>]++' used? did really nobody ever thought about that case? or is it not worth to mind it because it's rarely used?

with that (just an example):

Code:
<div(\s( \w=$AV(*)| \w)\#++|)>

we get what we want. it works no matter how many '>' there are in attribute values. but it makes the code harder to read and slower. that's for sure. but i think it's worth it to get no errors. what do you think?
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
Character '>' in Attribute Values - neverwasinparis - Nov. 27, 2012 10:10 AM
RE: Character '>' in Attribute Values - JJoe - Nov. 28, 2012, 02:14 AM

Forum Jump: