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.
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.
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).
(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.
<rdar://problem/108110961>
Possible regression from Bug 201699 where I was aligning with the spec.
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.
(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.
In the most Safari version 16.6 (18615.3.12.11.2) I no longer can reproduce the error. Seems fixed.
Are you sure it's because of a Safari change or might the FRITZ!Box router have received a software update?