1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:38:10 +00:00

LibWeb: Fix js execution for js urls in anchor tags href

This commit is contained in:
PrestonLTaylor 2023-06-26 20:04:14 +01:00 committed by Andreas Kling
parent 1a10e904b5
commit 0eac8bce6f
4 changed files with 38 additions and 17 deletions

View file

@ -55,6 +55,11 @@ void HTMLAnchorElement::run_activation_behavior(Web::DOM::Event const&)
if (href().is_empty())
return;
// AD-HOC: follow_the_hyperlink currently doesn't navigate properly with javascript urls
// EventHandler::handle_mouseup performs the navigation steps for javascript urls instead
if (href().starts_with("javascript:"sv))
return;
// 2. Let hyperlinkSuffix be null.
Optional<DeprecatedString> hyperlink_suffix {};