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

Add the capability to process an iframe whose src attribute is set to an encoded value. #3

Closed
miherlosev opened this issue Jul 31, 2015 · 5 comments

Comments

@miherlosev
Copy link
Contributor

iframe.src = "javascript:'%3Chtml%3E%3Cbody%3E%3Ch1%3Etest%3C/h1%3E%3C/body%3E%3C/html%3E'"

Encoded attribute value will be applied for Safari 8, IE 11, Firefox,
not applied - Chrome 44

@inikulin
Copy link
Contributor

inikulin commented Aug 3, 2015

Can you provide code examples? Actual/expected? Check title with tech writers. It's not clear currently what's wrong and how it should be fixed.

@inikulin
Copy link
Contributor

inikulin commented Aug 4, 2015

\ping @miherlosev

@miherlosev
Copy link
Contributor Author

If I set an iframe src attribute to javascript:<html><body><h1>test</h1></body></html>, its content
will be <html><body><h1>test</h1></body></html>.
Hammerhead patches src attributes for such iframes and adds the additional code.

Some browsers (Safari 8, IE 11, Firefox) allows setting an iframe content by using an encoded value.
For example, if I set
iframe.src to javascript:'%3Chtml%3E%3Cbody%3E%3Ch1%3Etest%3C/h1%3E%3C/body%3E%3C/html%3E', its content will be <html><body><h1>test</h1></body></html>.
Hammerhead cannot patch an src attribute with an encoded value.

@miherlosev miherlosev changed the title Add ability to processing iframe.src with value as encoded javascript protocol Add the capability to process an iframe whose src attribute src attribute is set to an encoded value. Aug 5, 2015
@miherlosev miherlosev changed the title Add the capability to process an iframe whose src attribute src attribute is set to an encoded value. Add the capability to process an iframe whose src attribute is set to an encoded value. Aug 5, 2015
@miherlosev
Copy link
Contributor Author

It's a non documented behavior.

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked Issues that were automatically locked by the Lock bot label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants