Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Fix HTML from being stripped from pasted text #98

Merged
merged 1 commit into from Jan 16, 2019

Conversation

JWambaugh
Copy link
Contributor

@JWambaugh JWambaugh commented Jan 15, 2019

Description

As described in #34, HTML tags were being stripped from pasted text. This is due to using the insertHTML() function to insert the text. Because we were using insertHTML(), the browser was attempting to interpret the pasted HTML as markup, and was stripping it out of the JSON.

This PR simply changes to using the insertText() function instead so the pasted text is inserted as-is without being interpreted by the browser.

Testing

Copy text containing HTML markup into a JSON string. Note that tags are no longer stripped.

@SachsKaylee
Copy link
Collaborator

SachsKaylee commented Jan 16, 2019

Hello @martamius
Thank you very much for fixing this.

I'll go ahead and merge this change. However note that this library is currently considered unmaintained until someone can be found who is able to dedicate the required time into it.

@SachsKaylee SachsKaylee merged commit b7b261d into AndrewRedican:master Jan 16, 2019
@AndrewRedican
Copy link
Owner

AndrewRedican commented Jan 17, 2019

Hi @martamius,

Thanks for your contribution. I will see that this is published to npm some time today after some tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants