Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing truncation of special attribute (src and style) values containing '=' #714

Merged
merged 1 commit into from
Feb 4, 2014

Conversation

ccummings
Copy link
Contributor

Exact same issue as #342 except with src and style which are considered special attributes. Values for special attributes are passed to getValue where they are run through a few regex.

The value passed to getValue has the attribute name in it followed by an =, so if your src value has a '=' in it like myImage.png?wid=900&hei=450, getValue would be operating on src="myImage.png?wid=900&hei=450" and you would end up with 450.

Fix is to change the attribute regex to take the string after the first = instead of taking the string after the last =

@justinbmeyer
Copy link
Contributor

@ccummings can you write a new test instead of modifying the old one? As a div and image each take a separate path when being live-bound, we should keep a test for both cases.

@justinbmeyer justinbmeyer added this to the 2.0.5 milestone Feb 4, 2014
@justinbmeyer
Copy link
Contributor

I'm going to merge. @ccummings please add this in for 2.1.

justinbmeyer added a commit that referenced this pull request Feb 4, 2014
Fixing truncation of special attribute (src and style) values containing '='
@justinbmeyer justinbmeyer merged commit 63ebd7f into master Feb 4, 2014
@daffl daffl deleted the attribute-value-escaping branch February 24, 2014 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants