fix: escape double-quotes and backslashes in device attributes#30746
fix: escape double-quotes and backslashes in device attributes#30746Koenkk merged 5 commits intoKoenkk:devfrom
Conversation
Some devices, like Philips Hue Downlights, have special characters in them e.g. `"` (meaning the unit of measurement, "inch"). This breaks .dot files upon generation. This PR escapes those, and backslashes, should they exist elsewhere.
|
We might want a CI test for this, if it's a breaking pattern for graphviz. |
|
Fair enough. I’m not a JS/TS programmer, but I can take a look at the test setup and see what I can do. It might be a while though, as my area is supposed to get clobbered with snow and ice this weekend, so I’m prepping for that. |
|
I think a copy of this with zigbee2mqtt/test/extensions/networkMap.test.ts Lines 368 to 404 in 3a49c95 |
|
As mentioned, I am not a JS/TS programmer (100% ChatGPT work for this test) so if you want any of this changed, let me know, but otherwise I think it should be good to go. EDIT: Well, shit. It passed locally. EDIT2: It passes on CI now as well, I see - not sure what the issue was before. |
|
Thanks! |
…ibutes (#30746) Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Some devices, like Philips Hue Downlights, have special characters in them e.g.
"(meaning the unit of measurement, "inch"). This breaks .dot files upon generation.This PR escapes those, and backslashes, should they exist elsewhere.