% and custom widgets

Has anyone noticed that if there is a % sign in the custom widget HTML, that the “Save” button won’t work and the configuration won’t save?

I’m using Chrome and the latest snapshot.

Tried it and didn’t encounter any errors, can you check out the Chrome developer tools (F12) and report anything unexpected (the HTTPS service worker thing isn’t an issue) in the Console & Network tabs?

Here is what the console log shows:

Error while saving to openHAB 2 configuration
openhab.service.js:294 openHAB 2 service configuration loaded
vendor.js:119 URIError: URI malformed
    at decodeURI (<anonymous>)
    at XMLHttpRequest.send (xhrExtension.js:2)
    at vendor.js:105
    at n (vendor.js:100)
    at vendor.js:98
    at vendor.js:132
    at m.$eval (vendor.js:147)
    at m.$digest (vendor.js:144)
    at m.$apply (vendor.js:147)
    at l (vendor.js:99)
(anonymous) @ vendor.js:119
(anonymous) @ vendor.js:92
(anonymous) @ vendor.js:133
$eval @ vendor.js:147
$digest @ vendor.js:144
$apply @ vendor.js:147
l @ vendor.js:99
K @ vendor.js:103
N.onload @ vendor.js:104
openhab.service.js:332 Error while saving openHAB 2 service configuration: {}
(anonymous) @ openhab.service.js:332
(anonymous) @ vendor.js:132
$eval @ vendor.js:147
$digest @ vendor.js:144
$apply @ vendor.js:147
l @ vendor.js:99
K @ vendor.js:103
N.onload @ vendor.js:104
persistence.service.js:110 Error while saving to openHAB 2 configuration

If I remove the % from the HTML it saves fine and doesn’t show that error.

Thanks for looking into it

Well this is not normal and possibly related - but I don’t see why a % in the HTML could end up screwing the URL… Very weird. Also I still can’t reproduce it, works fine on my end with beta 5. :confused:

@Mike_Bagdanoff: you might want to look up this thread

https://community.openhab.org/t/known-issues-w-habpanel-not-saving-custom-widgets

I’m guessing you have the LastPass extension :slight_smile:
It hijacks URLs and is causing problems currently.

yes I do. Thanks, the workaround worked too.