From 9587bc4a5094a8b6be4d232957f1c7f8e92899fd Mon Sep 17 00:00:00 2001 From: David O'Trakoun Date: Tue, 10 Oct 2017 01:00:42 -0400 Subject: [PATCH 1/4] 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.` --- packages/slate-html-serializer/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/slate-html-serializer/src/index.js b/packages/slate-html-serializer/src/index.js index b7e689963..99b5fe7e1 100644 --- a/packages/slate-html-serializer/src/index.js +++ b/packages/slate-html-serializer/src/index.js @@ -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' }], From 678589a80908530e26d83183e0920c6674b0374d Mon Sep 17 00:00:00 2001 From: Gabin Aureche Date: Wed, 11 Oct 2017 09:42:59 +0200 Subject: [PATCH 2/4] Fix broken link to setKeyGenerator (#1214) --- docs/reference/slate/node.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/slate/node.md b/docs/reference/slate/node.md index 5cadfc849..8a1e3bf9e 100644 --- a/docs/reference/slate/node.md +++ b/docs/reference/slate/node.md @@ -13,7 +13,7 @@ A short-lived, unique identifier for the node. By default, keys are **not** meant to be long-lived unique identifiers for nodes that you might store in a database, or elsewhere. They are meant purely to identify a node inside of a single Slate instance. For that reason, they are simply auto-incrementing strings. (eg. `'0'`, `'1'`, `'2'`, ...) -If you want to make your keys uniqueness long-lived, you'll need to supply your own key generating function via the [`setKeyGenerator`](../utils/utils.md#setkeygenerator) util. +If you want to make your keys uniqueness long-lived, you'll need to supply your own key generating function via the [`setKeyGenerator`](./utils.md#setkeygenerator) util. ### `nodes` `Immutable.List` From 5047007092a740828150505dad4437aef23f60c8 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Thu, 12 Oct 2017 14:20:06 -0700 Subject: [PATCH 3/4] update JSFiddle url --- Contributing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Contributing.md b/Contributing.md index 6051784f4..436548f94 100644 --- a/Contributing.md +++ b/Contributing.md @@ -21,13 +21,13 @@ If you run into any weird behavior while using Slate, feel free to open a new is Any issue you open must include: -- A [JSFiddle](https://jsfiddle.net/2zokvrvt/179/) that reproduces the bug with a minimal setup. +- A [JSFiddle](https://jsfiddle.net/2zokvrvt/192/) that reproduces the bug with a minimal setup. - A GIF showing the issue in action. (Using something like [RecordIt](http://recordit.co/).) - A clear explanation of what the issue is. -Here's a [JSFiddle template for Slate](https://jsfiddle.net/2zokvrvt/179/) to get you started: +Here's a [JSFiddle template for Slate](https://jsfiddle.net/2zokvrvt/192/) to get you started: -[![](./docs/images/jsfiddle.png)](https://jsfiddle.net/2zokvrvt/179/) +[![](./docs/images/jsfiddle.png)](https://jsfiddle.net/2zokvrvt/192/) ## Asking Questions From b63a84025a707fa1920940bc06665a86c925bf73 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Thu, 12 Oct 2017 14:20:29 -0700 Subject: [PATCH 4/4] update JSFiddle template --- .github/ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e300cb788..dcdab54be 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -20,7 +20,7 @@ If you don't include these, there's a very good chance your issue will be closed We need to keep the issues actionable, or else maintaining Slate becomes overwhelming. Thank you for understanding! -https://jsfiddle.net/2zokvrvt/179/ +https://jsfiddle.net/2zokvrvt/192/ http://recordit.co/ -->