WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
255205
InvalidCharacterError: The string contains invalid characters on the webfrontend of a FRITZ!Box router
https://bugs.webkit.org/show_bug.cgi?id=255205
Summary
InvalidCharacterError: The string contains invalid characters on the webfront...
thomas
Reported
2023-04-09 12:48:02 PDT
Created
attachment 465822
[details]
Error message in the web inspector When opening the network settings of the web frontend a FRITZ!Box router (running FRITZ!OS 7.50) the rendering of the page is interupted by this Error message in web inspector: InvalidCharacterError: The string contains invalid characters It refers to the function setAttribute in line 13:102 in the file html2.js, which is in combination with line 12: function createAttributes(el, attributes={}) { for (let name in attributes) { if (attributes.hasOwnProperty(name)) { let value = attributes[name]; name = name.toLowerCase(); if (!checkAndSetEventHandler(el, name, value)) { if (value === true) { value = ""; } if (value === null || value === false) { el.removeAttribute(name); } else if (value !== undefined) { el.setAttribute(name, value); } } } } } I could reproduce this errror in Safari on iOS 16.4.1 and macOS 13.3.1 and also the Technology Preview 167. Chrome 112.0.5615.49 and Firefox 111.0.1 display the page w/o a problem or error.
Attachments
Error message in the web inspector
(972.35 KB, image/png)
2023-04-09 12:48 PDT
,
thomas
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2023-04-10 15:58:35 PDT
Thank you for the report! As you are looking at this in Web Inspector already, could you please share the name/value pair causing this failure? Otherwise, there isn't really a way for us to investigate, as we don't have this hardware.
Anne van Kesteren
Comment 2
2023-04-11 08:49:20 PDT
It does look like
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/Document.cpp#L427-L433
and
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/document.cc;l=491-520
are somewhat different, but all browsers might end up changing this as per
bug 241419
(loosening up restrictions even more).
Chris Dumez
Comment 3
2023-04-11 08:55:16 PDT
(In reply to Anne van Kesteren from
comment #2
)
> It does look like >
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/Document
. > cpp#L427-L433 and >
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/
> renderer/core/dom/document.cc;l=491-520 are somewhat different, but all > browsers might end up changing this as per
bug 241419
(loosening up > restrictions even more).
If I remember correctly, we had aligned this function with the spec text and the WPT tests at the time.
Radar WebKit Bug Importer
Comment 4
2023-04-16 12:48:13 PDT
<
rdar://problem/108110961
>
Chris Dumez
Comment 5
2023-05-05 11:35:55 PDT
Possible regression from
Bug 201699
where I was aligning with the spec.
thomas
Comment 6
2023-07-04 09:33:47 PDT
I just checked this bug with Safari Technology Preview Release 173 (Safari 17.0, WebKit 18616.1.20.2) and I can no longer reproduce the issue.
Chris Dumez
Comment 7
2023-07-05 08:42:02 PDT
(In reply to white.dog8802 from
comment #6
)
> I just checked this bug with Safari Technology Preview Release 173 (Safari > 17.0, WebKit 18616.1.20.2) and I can no longer reproduce the issue.
Thanks for letting us know.
thomas
Comment 8
2023-08-21 21:53:08 PDT
In the most Safari version 16.6 (18615.3.12.11.2) I no longer can reproduce the error. Seems fixed.
Anne van Kesteren
Comment 9
2023-08-23 03:49:21 PDT
Are you sure it's because of a Safari change or might the FRITZ!Box router have received a software update?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug