Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape pasted text in compose area #103

Merged
merged 4 commits into from
Mar 1, 2017
Merged

Escape pasted text in compose area #103

merged 4 commits into from
Mar 1, 2017

Conversation

dbrgn
Copy link
Contributor

@dbrgn dbrgn commented Feb 27, 2017

Sanitizing text would cause some non-HTML text to disappear (see #86). Instead, we escape HTML, so that it looks exactly like pasted.

The applyFilters helper function has been removed, it's unclear what it does. Being explicit is better in this case.

Fixes #86.

@dbrgn dbrgn requested a review from sillych February 27, 2017 12:13
@dbrgn
Copy link
Contributor Author

dbrgn commented Feb 27, 2017

@sillych I'm not sure whether we should remove the htmlToAsciiMarkup filter. What do you think happens more often, people pasting rich formatted text (e.g. bold) from a website or an e-mail and wanting it to be formatted, or people sharing HTML markup with coworkers? In the latter case, they'd want the HTML code to remain unchanged.

Sanitizing text would cause some non-HTML text to disappear (see #86).
Instead, we escape HTML, so that it looks exactly like pasted.

The applyFilters helper function has been removed, it's unclear what it
does. Being explicit is better in this case.
@dbrgn dbrgn merged commit bcaa4b2 into master Mar 1, 2017
@dbrgn dbrgn deleted the issue-86 branch March 1, 2017 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants