mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00: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:
parent
498e59f71d
commit
d2b2d57387
Notes:
github-actions[bot]
2025-10-28 18:50:37 +00:00
Author: https://github.com/Lubrsi
Commit: d2b2d57387
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6616
Reviewed-by: https://github.com/gmta ✅
3 changed files with 7 additions and 7 deletions
|
|
@ -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 {};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue