Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
jqmDataRE kills SAP URLs with brackets #4849
In jquery.mobile-1.1.1.js on line 1543 there is the following:
This basically searches a string from :jqmData till the end or next closing bracket .
However, some URLs (like those of SAP BSPs) have brackets in them. Example:
Such URLs get destroyed by the above RegEx.
which is an invalid jQuery selector.
Basically the jqmDataRE regex assumes URLs do not have brackets in them and SAP URLs always have brackets in them.
I have found searching for a space to be better:
jqmDataRE = /:jqmData(([^ ]*))/g;
Thanks for logging the issue.
We clearly need to deal with this case given that the paren is a valid URL char per the spec. Unfortunately your proposed change won't work because we may (now or in the future) have
$( ":jqmData(text='foo bar baz')" );
It looks like we'll have to do a manual namespace concat in the places where we're selecting on the URL. I should have a patch for this some time today.