1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-29 18:09:49 +02:00

Sanitize tagName check (#1212)

`In XML (and XML-based languages such as XHTML), tagName preserves case. On HTML elements in DOM trees flagged as HTML documents, tagName returns the element name in the uppercase form.`
This commit is contained in:
David O'Trakoun
2017-10-10 01:00:42 -04:00
committed by Ian Storm Taylor
parent e0d7122881
commit 9587bc4a50

View File

@@ -27,7 +27,7 @@ const String = new Record({
const TEXT_RULE = {
deserialize(el) {
if (el.tagName == 'br') {
if (el.tagName.toLowerCase() == 'br') {
return {
kind: 'text',
ranges: [{ text: '\n' }],