diff --git a/CHANGELOG.md b/CHANGELOG.md index 37bc069d9..d8846f4b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. ### Fixed - ESP32 Webcam add boundary marker before sending mjpeg image (#12376) - DDS238-2 wrong reactive power value (#12283) +- NO VALID JSON regression from may 4th (#12440) ## [Released] diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 9248da449..e5839a07a 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -107,6 +107,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo ### Fixed - DDS238-2 wrong reactive power value [#12283](https://github.com/arendst/Tasmota/issues/12283) - ESP32 Webcam add boundary marker before sending mjpeg image [#12376](https://github.com/arendst/Tasmota/issues/12376) +- NO VALID JSON regression from may 4th [#12440](https://github.com/arendst/Tasmota/issues/12440) ### Noted - ESP32 single core **tasmota32solo1.bin** binary can only be uploaded using the GUI as OTA upload will trigger the watchdog timer \ No newline at end of file diff --git a/tasmota/xdrv_10_rules.ino b/tasmota/xdrv_10_rules.ino index b7e4b9238..4dc784da1 100644 --- a/tasmota/xdrv_10_rules.ino +++ b/tasmota/xdrv_10_rules.ino @@ -512,7 +512,13 @@ bool RulesRuleMatch(uint8_t rule_set, String &event, String &rule, bool stop_all //AddLog(LOG_LEVEL_DEBUG, PSTR("RUL-RM2: RulesRuleMatch |%s|"), buf.c_str()); - buf.replace("\\"," "); // "Disable" any escaped control character +// Do not do below replace as it will replace escaped quote too. +// buf.replace("\\"," "); // "Disable" any escaped control character + buf.replace("\n"," n"); // "Disable" escaped control character + buf.replace("\t"," t"); // "Disable" escaped control character + buf.replace("\r"," r"); // "Disable" escaped control character + buf.replace("\f"," f"); // "Disable" escaped control character + buf.replace("\b"," b"); // "Disable" escaped control character JsonParser parser((char*)buf.c_str()); JsonParserObject obj = parser.getRootObject(); if (!obj) { @@ -2139,8 +2145,8 @@ void CmndRule(void) } // we need to split the rule in chunks - rule = rule.substring(0, MAX_RULE_SIZE); - rule += F("..."); +// rule = rule.substring(0, MAX_RULE_SIZE); +// rule += F("..."); } Response_P(PSTR("{\"%s%d\":{\"State\":\"%s\",\"Once\":\"%s\",\"StopOnError\":\"%s\",\"Length\":%d,\"Free\":%d,\"Rules\":\"%s\"}}"), XdrvMailbox.command, index, GetStateText(bitRead(Settings->rule_enabled, index -1)), GetStateText(bitRead(Settings->rule_once, index -1)),