AO3-3464 HTML parser eats text after a missing quote upon preview or posting#5828
Open
forceofcalm wants to merge 9 commits into
Open
AO3-3464 HTML parser eats text after a missing quote upon preview or posting#5828forceofcalm wants to merge 9 commits into
forceofcalm wants to merge 9 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-3464
Purpose
Previously, an open quote in an HTML tag attribute would cause Nokogiri to "eat" the rest of the tag and its text until it found another quote or some other delimiter, sometimes resulting in a significant loss of user work. This change should sanitize any "loose" open quotes and intelligently find and add the closing quote to prevent this loss.
Testing Instructions
I have added tests, but this should also be tested manually in new/edit/preview works and in comments.
Credit
calm (they/them)