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

AO3-4976 Fix stray semicolons in autocomplete results with ampersands #2923

Merged

Conversation

redsummernight
Copy link
Member

Issue

https://otwarchive.atlassian.net/browse/AO3-4976

Purpose

Avoid highlighting an empty search term, which can split an ampersand entity, leaving a semicolon: &amp<b></b>;.

The minified js file is generated using uglify-js 3.0.12.

uglifyjs public/javascripts/jquery.tokeninput.js -o public/javascripts/jquery.tokeninput.min.js -c -m

Install (vagrant):

sudo apt install npm
sudo apt install nodejs-legacy
sudo npm install uglify-js -g

Testing

See issue.

On any field with autocomplete, search for something with ampersands (usually relationships). The search query should contain extra spaces, example: " term", "term ", "term 1". Without the fix, there will be semicolons.

Avoid highlighting an empty search term, which can split an ampersand
entity, leaving a semicolon: "&amp<b></b>;".
@redsummernight redsummernight force-pushed the AO3-4976-semicolon-tokeninput branch from 5fdf6e6 to 0be741c Compare May 30, 2017 00:45
Copy link
Collaborator

@sarken sarken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, this looks good -- thanks!

@sarken sarken merged commit e058efc into otwcode:master Oct 5, 2017
@redsummernight redsummernight deleted the AO3-4976-semicolon-tokeninput branch October 5, 2017 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants