rangy
rangy copied to clipboard
TextRange module's findText fix for text with non-breaking space.
Added fix to the TextRange module's findText method to search and match the text when the text in the document contains non-breaking space ( ). For example, if the document has html "test match with findText", innerText would return "test match with findText". Even though the space looks normal whitespace between "test match", this is decoded character value of . When we search for "test match", textRange.findText wouldn't find match. According to the documentation, search should be performed on the visible text of the document but not on the decoded characters. Hence I made this change.
merged PR here: https://github.com/pburrows/rangy-updated/commit/854b8ad22663de453c414c89ed1eb936a8a3663b