Nov. 27, 2012, 10:10 AM
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:
'[^>]++' 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):
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?
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?