Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Allow configuration of iframe src attribute #2652

Merged
merged 1 commit into from Oct 9, 2013
Merged

Allow configuration of iframe src attribute #2652

merged 1 commit into from Oct 9, 2013

Conversation

ghost
Copy link

@ghost ghost commented Oct 9, 2013

Not sure if you have an alternate thought on how to solve this problem, but the change is simple enough that kicking it off with a pull request makes sense to me.

Inspiration:

In my org, we're planning to ship with Content Security Policy enabled.

This poses a minor problem with the iframe transport, which uses src="javascript:false;", leading to the following error (in Firefox, Chrome gives a similar error):

Content Security Policy: Directive inline script base restriction violated

Proposed Solution:

Allow the user of the iframe transport to configure the iframe's src attribute. Default to the old behavior, javascript:false;.

In my org, all the browsers we plan on supporting handle about:blank, so we could go with that, fixing the issue and preventing any error from getting logged.

blueimp added a commit that referenced this pull request Oct 9, 2013
Allow configuration of iframe src attribute
@blueimp blueimp merged commit 3089970 into blueimp:master Oct 9, 2013
@blueimp
Copy link
Owner

blueimp commented Oct 9, 2013

Thanks for your contribution! 👍
I've refactored your code changes slightly and renamed the new option to initialIframeSrc:
https://github.com/blueimp/jQuery-File-Upload/wiki/Options#initialiframesrc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants