diff --git a/src/modules/rangy-textrange.js b/src/modules/rangy-textrange.js index f166d570..ea59886b 100644 --- a/src/modules/rangy-textrange.js +++ b/src/modules/rangy-textrange.js @@ -188,6 +188,9 @@ rangy.createModule("TextRange", ["WrappedSelection"], function(api, module) { // Check if character is ignored var ignoredChars = ignoredCharacters || ""; + if (ignoredCharacters === "") + return ignoredCharacters + // Normalize ignored characters into a string consisting of characters in ascending order of character code var ignoredCharsArray = (typeof ignoredChars == "string") ? ignoredChars.split("") : ignoredChars; ignoredCharsArray.sort(function(char1, char2) {