Skip to content

Strip HTML tags when generating sort title #159

Open
@dstillman

Description

@dstillman

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions