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:
Luke Wilde 2025-10-28 15:02:31 +00:00 committed by Jelle Raaijmakers
parent 498e59f71d
commit d2b2d57387
Notes: github-actions[bot] 2025-10-28 18:50:37 +00:00
3 changed files with 7 additions and 7 deletions

View file

@ -707,7 +707,7 @@ WebIDL::ExceptionOr<void> HTMLScriptElement::set_src(TrustedTypes::TrustedScript
TrustedTypes::Script.to_string()));
// 2. Set thiss 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 {};
}