Skip to content

strip titles of html tags + update regex#160

Open
abaevbog wants to merge 1 commit into
zotero:masterfrom
abaevbog:strip_tags
Open

strip titles of html tags + update regex#160
abaevbog wants to merge 1 commit into
zotero:masterfrom
abaevbog:strip_tags

Conversation

@abaevbog
Copy link
Copy Markdown
Contributor

Strip all html tags from title in getSortTitle function
Update the regex in getSortTitle to not skip double brackets

Fixes: #159

Strip all html tags from title in getSortTitle function
Update the regex in getSortTitle to not skip double brackets

Fixes: zotero#159
@abaevbog abaevbog requested a review from dstillman July 13, 2023 01:20
@abaevbog
Copy link
Copy Markdown
Contributor Author

I noticed that existing regex does not strip all the special characters listed in the expression. For example "[[[Hello World]]]" becomes "[[Hello World". So I also updated the regex to '/[\[({\\-"\'“‘\])}\-"\'”’]/u' which does not do that.

@abaevbog abaevbog marked this pull request as ready for review July 13, 2023 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Strip HTML tags when generating sort title

1 participant