-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
Delete jQuery #3847
Delete jQuery #3847
Conversation
Perhaps it's an accidental leftover after #2234 but let me double check. Edit: the jQuery thing lgtm in principle. |
I'd rather you didn't try to combine such completely unrelated things in the same PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely used:
Lines 432 to 454 in 50ba6bb
if ($html) { | |
require_once(LIB_PATH . '/lib_phpQuery.php'); | |
$doc = phpQuery::newDocument($html); | |
if ($maxRedirs > 0) { | |
//Follow any HTML redirection | |
$metas = $doc->find('meta[http-equiv][content]'); | |
foreach ($metas as $meta) { | |
if (strtolower(trim($meta->getAttribute('http-equiv'))) === 'refresh') { | |
$refresh = preg_replace('/^[0-9.; ]*\s*(url\s*=)?\s*/i', '', trim($meta->getAttribute('content'))); | |
$refresh = SimplePie_Misc::absolutize_url($refresh, $url); | |
if ($refresh != false && $refresh !== $url) { | |
phpQuery::unloadDocuments(); | |
return self::getContentByParsing($refresh, $path, $attributes, $maxRedirs - 1); | |
} | |
} | |
} | |
} | |
$content = $doc->find($path); | |
$html = trim(sanitizeHTML($content->__toString(), $url)); | |
phpQuery::unloadDocuments(); | |
return $html; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eek, meant the other one.
phpQuery is still used for full article content retrieval and has been patched by us along the way, e.g. to support PHP8. |
This reverts commit ff0cbce.
Reverted lip_phpQuery |
Let's go for it 🙂 |
Closes #3845
Changes proposed in this pull request:
jQuery is included just in the stats, but it looks like that we does not need it anymore.
So in general jQuery is not needed anymore in the core.
lib_phpQuery looks like unused in the core.
Also: It looks like that the development and active usage of phpQuery stopped in 2015: https://code.google.com/archive/p/phpquery/issues/246
How to test the feature manually:
Pull request checklist:
I will publish this changes as draft first! Will see if the changes breaks the system or not.