Skip to content

Remove HTML4 data-* attributes, and replace with is #21

@revivek

Description

@revivek

As of June 10, 2015, we can remove the data-* attributes that get search and replaced (data-bgcolor, data-align, etc.) to the HTML4 variants. We can use the is property. This should also fix an unlikely but still possible bug resulting from the current search and replace strategy: since we operate on the raw string, all of data-background and its cousins would be replaced. This means an HTML5 newsletter writing about how "AlignerFoo.js uses data-align to align your elements" would turn into "AlignerFoo.js uses align to align your elements."

facebook/react#140 (comment)
facebook/react#3752

To do:

  • Remove data-* attributes from OyTable, OyImg, etc.
  • Place is attribute before those removed data-* attributes.
  • Remove current find and replacing of data-* attributes in utils/HTML4.js
  • Add a test to make sure that case above doesn't occur.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions