heiseonline / shariff

👮 Shariff enables website users to share their favorite content without compromising their privacy.
http://ct.de/-2467514
MIT License
1.4k stars 177 forks source link

data-title only used as a fallback #143

Closed Klopfer1402 closed 7 years ago

Klopfer1402 commented 8 years ago

This issue was also raised in #43, but obviously it still persists: The data-title attribute is only used if there's no DC.title meta tag. This is backwards logic: If I have multiple blog posts on one website, I'd like Shariff to use the individual data-title attributes instead of the title for the blog as a whole.

Instead of checking the length of DC.title and then falling back on getTitle() if DC.title.length is 0, it should check the length of the return value of getTitle() first and use that if it's there, right?

liayn commented 8 years ago

Sounds very reasonable.

compeak commented 8 years ago

A pull request fixing this bug would be welcome.