mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Set attribute value directly in HTMLScriptElement::set_src
Otherwise we'll try to use the Utf16String that has already been through Trusted Types and put it through again. That can also fail if there's no default policy and there's a `require-trusted-types-for 'script'` directive. Fixes Outlook failing to load.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
498e59f71d
commit
d2b2d57387
Notes:
github-actions[bot]
2025-10-28 18:50:37 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/d2b2d573879 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6616 Reviewed-by: https://github.com/gmta ✅
@@ -707,7 +707,7 @@ WebIDL::ExceptionOr<void> HTMLScriptElement::set_src(TrustedTypes::TrustedScript
|
||||
TrustedTypes::Script.to_string()));
|
||||
|
||||
// 2. Set this’s src content attribute to value.
|
||||
TRY(set_attribute(AttributeNames::src, value));
|
||||
set_attribute_value(AttributeNames::src, value.to_utf8_but_should_be_ported_to_utf16());
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user