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

Remove attributes that start with xml #289

Closed
wants to merge 3 commits into from
Closed

Conversation

sevatt
Copy link

@sevatt sevatt commented Feb 29, 2016

Per the amphtml spec (https://www.ampproject.org/docs/reference/spec.html), XML-related attributes, such as xmlns, xml:lang, xml:base, and xml:space are disallowed in AMP HTML.

This update removes these disallowed attribute.

@sevatt
Copy link
Author

sevatt commented Feb 29, 2016

Realized you might want an example for when users see this. We have twitter embeds that take the form of:

<blockquote class="twitter-tweet" lang="en" xml:lang="en"><p>Seville Classics Wide Stacking Shelf, 14" x 30" x 15" (Misc.): $25.02: 34.33% drop: <a href="https://t.co/W73txIfWCO" >https://t.co/W73txIfWCO </a></p>— PriceChirp (@pricechirp) <a href="https://twitter.com/pricechirp/status/704410835653779457" > February 29, 2016</a></blockquote>

While this format appears to be legacy, we want to "sanitize" it to prevent amp validation errors.

…utes to strip. The removed attributes are moved to classes in the form attribute-name_value.
@mjangda
Copy link
Contributor

mjangda commented Jul 14, 2017

Closing as we've moved to a whitelist-based approach #600

@mjangda mjangda closed this Jul 14, 2017
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

Successfully merging this pull request may close these issues.

2 participants