vigetlabs / colonel-kurtz

A Block Editor
MIT License
319 stars 33 forks source link

Use regex instead of DOM traversal to sanitize embeds #149

Closed nhunzaker closed 5 years ago

nhunzaker commented 5 years ago

Problem:

Typing HTML into the HTML embed content block turns carrot symbols into HTML entities. This makes it impossible to type HTML into the embed.

Solution:

Instead of traversing the DOM, sanitizing occurs with a regular expression. This allows more flexible content entry. Additionally it adds a flag to turn this behavior off in case it becomes a problem.

codecov-io commented 5 years ago

Codecov Report

Merging #149 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #149   +/-   ##
=======================================
  Coverage   93.89%   93.89%           
=======================================
  Files          33       33           
  Lines         295      295           
  Branches       43       43           
=======================================
  Hits          277      277           
  Misses         16       16           
  Partials        2        2

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5a2fa4f...5422ca0. Read the comment docs.