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

Strip HTML tags when generating sort title #159

Open
dstillman opened this issue Jul 11, 2023 · 1 comment · May be fixed by #160
Open

Strip HTML tags when generating sort title #159

dstillman opened this issue Jul 11, 2023 · 1 comment · May be fixed by #160
Assignees

Comments

@dstillman
Copy link
Member

zotero/web-library#515 (comment)

We can probably just use PHP's strip_tags() and strip all HTML tags rather than just the supported tags in the linked issue. getSortTitle() (which gets used in Item::save() to generate a value for the itemSortFields table) already strips various visible characters, so it seems fine and appropriate for HTML tags that are displayed raw rather than rendered to still be ignored for sorting. In fact, we should make that change to the desktop app too after this.

We'll also need a db-updates step to reprocess all existing titles in order to get proper sorting of existing items.

abaevbog added a commit to abaevbog/dataserver that referenced this issue Jul 13, 2023
Strip all html tags from title in getSortTitle function
Update the regex in getSortTitle to not skip double brackets

Fixes: zotero#159
@abaevbog abaevbog linked a pull request Jul 13, 2023 that will close this issue
@tnajdek
Copy link
Member

tnajdek commented Apr 20, 2024

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

Successfully merging a pull request may close this issue.

3 participants