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

Drop runtime validation and lower case coercion of tag names #8563

Merged
merged 3 commits into from
Dec 13, 2016

Commits on Dec 13, 2016

  1. Warn if upper-case tags are used

    In facebook#2756 we ended up using toLowerCase to allow case insensitive HTML tags.
    However, this requires extra processing every time we access the tag or
    at least we need to process it for mount and store it in an extra field
    which wastes memory.
    
    So instead, we can just enforce case sensitivity for HTML since this might
    matter for the XML namespaces like SVG anyway.
    sebmarkbage committed Dec 13, 2016
    Configuration menu
    Copy the full SHA
    3092f63 View commit details
    Browse the repository at this point in the history
  2. Only do runtime validation of tag names when createElement is not used

    We introduced runtime validation of tag names because we used to generate
    HTML that was supposed to be inserted into a HTML string which could've
    been an XSS attack.
    
    However, these days we use document.createElement in most cases. That
    already does its internal validation in the browser which throws. We're now
    double validating it. Stack still has a path where innerHTML is used and
    we still need it there. However in Fiber we can remove it completely.
    sebmarkbage committed Dec 13, 2016
    Configuration menu
    Copy the full SHA
    db489a4 View commit details
    Browse the repository at this point in the history
  3. Pass type to the relevant host config methods

    Instead of reading it from the DOM node.
    sebmarkbage committed Dec 13, 2016
    Configuration menu
    Copy the full SHA
    6c1592f View commit details
    Browse the repository at this point in the history