zotero / dataserver

Zotero Data Server
Other
274 stars 72 forks source link

Strip HTML tags when generating sort title #159

Open dstillman opened 1 year ago

dstillman commented 1 year ago

https://github.com/zotero/web-library/issues/515#issuecomment-1629431483

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.

tnajdek commented 5 months ago

https://forums.zotero.org/discussion/113845/web-library-sort-order-problems