mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-23 02:31:55 +00:00
LibWeb: Don't include SVG script element in HTMLOptionElement.text
We had an old FIXME for this from times before SVGScriptElement was a thing in our codebase.
This commit is contained in:
parent
4c2d4cdf50
commit
77d30a0cb7
Notes:
github-actions[bot]
2024-11-15 11:55:40 +00:00
Author: https://github.com/awesomekling
Commit: 77d30a0cb7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2355
2 changed files with 4 additions and 5 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <LibWeb/HTML/HTMLSelectElement.h>
|
||||
#include <LibWeb/HighResolutionTime/TimeOrigin.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
#include <LibWeb/SVG/SVGScriptElement.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -88,8 +89,7 @@ WebIDL::ExceptionOr<void> HTMLOptionElement::set_value(String const& value)
|
|||
|
||||
static void concatenate_descendants_text_content(DOM::Node const* node, StringBuilder& builder)
|
||||
{
|
||||
// FIXME: SVGScriptElement should also be skipped, but it doesn't exist yet.
|
||||
if (is<HTMLScriptElement>(node))
|
||||
if (is<HTMLScriptElement>(node) || is<SVG::SVGScriptElement>(node))
|
||||
return;
|
||||
if (is<DOM::Text>(node))
|
||||
builder.append(verify_cast<DOM::Text>(node)->data());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue