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 tags for meta properties #21

Merged
merged 2 commits into from
Aug 13, 2021
Merged

Strip tags for meta properties #21

merged 2 commits into from
Aug 13, 2021

Conversation

fritzmg
Copy link
Contributor

@fritzmg fritzmg commented Jul 13, 2021

In the extractor classes replaceInsertTags is used for all fields. However, if you use

DAS {{br}}MODEL {{br}}UND SEIN {{br}}TÜFTLER

in a news headline for example (in order to force breaks at specific points), the resulting og:title for example will be

<meta prefix="og: http://ogp.me/ns#" property="og:title" content="DAS  &lt;br&gt;MODELL &lt;br&gt;UND SEIN  &lt;br&gt;TÜFTLER">

which will then look like this when sharing:

image

To fix this any HTML tags should be stripped for these HTML attributes.

@dmolineus dmolineus self-assigned this Aug 13, 2021
@dmolineus dmolineus added the bug Something isn't working label Aug 13, 2021
@dmolineus dmolineus merged commit 8816e70 into hofff:master Aug 13, 2021
@dmolineus
Copy link
Collaborator

Thanks @fritzmg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants