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

Graceful degradation in case of legacy browser? #36

Closed
cure53 opened this issue Oct 7, 2014 · 1 comment
Closed

Graceful degradation in case of legacy browser? #36

cure53 opened this issue Oct 7, 2014 · 1 comment

Comments

@cure53
Copy link
Owner

cure53 commented Oct 7, 2014

We might want to think about what happens, when the browser running a purified website is not supporting what DOMPurify needs.

Should we just return the original string? Or are we in a position to modify something?

cure53 added a commit that referenced this issue Oct 7, 2014
Added feature test and opt-out
@cure53
Copy link
Owner Author

cure53 commented Oct 7, 2014

That should do and tests pass. Any thoughts?

        /* Feature check and untouched opt-out return */
        if(typeof document.implementation.createHTMLDocument === 'undefined') {
            return dirty;    
        }   

Robbert added a commit to Robbert/DOMPurify that referenced this issue Oct 8, 2014
@cure53 cure53 closed this as completed Oct 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant