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

iframe.src = 'javascript:'; breaking JS parsers #475

Closed
chrisathook opened this issue Jan 9, 2019 · 5 comments
Closed

iframe.src = 'javascript:'; breaking JS parsers #475

chrisathook opened this issue Jan 9, 2019 · 5 comments

Comments

@chrisathook
Copy link

This line is creating JS that won't pass a parser. I am uploading JS files to DoubleClick and this line is causing the units to throw errors. iframe.src = ''; does not seem to cause a problem. is it necessary to have the 'javascript:' part in there?

https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/object-create.js

@nicolo-ribaudo
Copy link
Contributor

Does 'javascript:;' work? (with the semicolon after the colon)

@chrisathook
Copy link
Author

it does not. any value other that '' seems to be treated as a relative path which the parser thinks in an asset.

below is the error message from the parser.

Make sure the filenames of all files in your .ZIP file are exactly the same as the name listed in the reference file.

For example, if one of the files in your .ZIP file is called path/to/example/asset, but in your HTML file you reference path/to/example/asset2, AdWords will not be able to to find the correct file.

To fix the issue, compare the filename listed above with every file in your HTML5 code. If it is not exactly the same, correct the reference.

More details:
INVALID_URL_REFERENCE: javascript:;

@zloirock
Copy link
Owner

Let's split it into some parts. I hope it will help.

@chrisathook
Copy link
Author

the error is still there just slightly different.

Make sure the filenames of all files in your .ZIP file are exactly the same as the name listed in the reference file.

For example, if one of the files in your .ZIP file is called path/to/example/asset, but in your HTML file you reference path/to/example/asset2, AdWords will not be able to to find the correct file.

To fix the issue, compare the filename listed above with every file in your HTML5 code. If it is not exactly the same, correct the reference.

More details:
INVALID_URL_REFERENCE: java

@chrisathook
Copy link
Author

var derp ="javascript:;";

iframe.src = String (derp);

seems to work.

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

No branches or pull requests

3 participants