Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions WebUI/www/api/eq3/hmscript.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ proc hmscript_runFromFile { filename {p_args -}} {
}

proc hmscript_escapeString { str } {
# Backslash MUST be escaped first, otherwise a backslash placed directly
# before a quote in user input would (after the quote is escaped to \")
# be read by ReGa as an escaped backslash, closing the string literal
# early and turning the rest of the input into executable HomeMatic Script.
return [string map {
"\\" "\\\\"
"\'" "\\\'"
"\"" "\\\""
"\n" "\\n"
Expand Down