mirror of
https://github.com/friendica/friendica
synced 2025-05-02 23:44:23 +02:00
Add HTML Purify to BBCode::convert
- Replace previous HTML cleanup using DOMDocument - Remove obsolete HTML::sanitizeCSS method - Use Strings::autoLinkRegEx for PageInfo::getRelevantUrlFromBody - Update previous tests expectations - Add new specific XSS tests
This commit is contained in:
parent
d8e3b841f8
commit
a0f6d678c4
4 changed files with 83 additions and 111 deletions
|
@ -265,7 +265,7 @@ class PageInfo
|
|||
}
|
||||
|
||||
if (!$matches && $searchNakedUrls) {
|
||||
preg_match('~(?<=\W|^)(?<![=\]])(https?://.+)$~is', $body, $matches);
|
||||
preg_match(Strings::autoLinkRegEx(), $body, $matches);
|
||||
if ($matches && !Strings::endsWith($body, $matches[1])) {
|
||||
unset($matches);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue