Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Ignore <noscript> tags when generating URL preview descriptions #2576

Merged
merged 1 commit into from
Nov 7, 2017
Merged

Ignore <noscript> tags when generating URL preview descriptions #2576

merged 1 commit into from
Nov 7, 2017

Conversation

maximevaillancourt
Copy link

What are you trying to do with this PR?

Exclude content in <noscript> tags from appearing in URL preview descriptions when there is no og:description meta tag on the page behind said URL.

Why are you going with this approach?

Most websites use <noscript> tags to display a message along the lines of "JavaScript is required to view this page. Please enable JavaScript and try again.". Since such a tag is usually the first child of the <body> element, Synapse picks up these words to approximate the page preview description. By excluding <noscript> tags, Synapse is more likely to end up using words that are actually relevant to the page content.

@matrixbot
Copy link
Member

Can one of the admins verify this patch?

2 similar comments
@matrixbot
Copy link
Member

Can one of the admins verify this patch?

@matrixbot
Copy link
Member

Can one of the admins verify this patch?

@erikjohnston
Copy link
Member

@matrixbot ok to test

@erikjohnston
Copy link
Member

@ara4n happy with this?

@ara4n
Copy link
Member

ara4n commented Nov 7, 2017

ecstatically - thanks @maximevaillancourt; sorry it took us a while to review!

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

Successfully merging this pull request may close these issues.

4 participants