mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 04:08:08 +00:00
LibWeb: Fix js execution for js urls in anchor tags href
This commit is contained in:
committed by
Andreas Kling
parent
1a10e904b5
commit
0eac8bce6f
@@ -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 {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user