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

Unexpected title cleaning #63

Open
Simounet opened this issue Apr 11, 2021 · 2 comments
Open

Unexpected title cleaning #63

Simounet opened this issue Apr 11, 2021 · 2 comments

Comments

@Simounet
Copy link
Contributor

Hi there,
I don't get why we are cleaning the title content before the : character. It could be legit content.

} elseif (false !== strpos($curTitle, ': ')) {

@j0k3r
Copy link
Owner

j0k3r commented Apr 12, 2021

I agree it could be a legit content but I guess that in most cases, the text before : is often the website name.

It's here since the beginning: https://bitbucket.org/fivefilters/php-readability/src/5112edb387b53931ab9324b890fa581c0e951d2d/Readability.php#lines-260

@Simounet
Copy link
Contributor Author

I understand but do you know many sites using this pattern? I don't. If we follow this rule, we should do the same with - and |. Sometimes the site name is at the beginning, sometimes at the end. Hard to tell.
I think that we should remove this or at least be able to bypass this condition.

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

No branches or pull requests

2 participants