mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Fix NO VALID JSON regression from may 4th
Fix NO VALID JSON regression from may 4th (#12440)
This commit is contained in:
parent
096f5606b6
commit
540574fe49
@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
### Fixed
|
### Fixed
|
||||||
- ESP32 Webcam add boundary marker before sending mjpeg image (#12376)
|
- ESP32 Webcam add boundary marker before sending mjpeg image (#12376)
|
||||||
- DDS238-2 wrong reactive power value (#12283)
|
- DDS238-2 wrong reactive power value (#12283)
|
||||||
|
- NO VALID JSON regression from may 4th (#12440)
|
||||||
|
|
||||||
## [Released]
|
## [Released]
|
||||||
|
|
||||||
|
@ -107,6 +107,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
|
|||||||
### Fixed
|
### Fixed
|
||||||
- DDS238-2 wrong reactive power value [#12283](https://github.com/arendst/Tasmota/issues/12283)
|
- 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)
|
- 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
|
### Noted
|
||||||
- ESP32 single core **tasmota32solo1.bin** binary can only be uploaded using the GUI as OTA upload will trigger the watchdog timer
|
- ESP32 single core **tasmota32solo1.bin** binary can only be uploaded using the GUI as OTA upload will trigger the watchdog timer
|
@ -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());
|
//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());
|
JsonParser parser((char*)buf.c_str());
|
||||||
JsonParserObject obj = parser.getRootObject();
|
JsonParserObject obj = parser.getRootObject();
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
@ -2139,8 +2145,8 @@ void CmndRule(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we need to split the rule in chunks
|
// we need to split the rule in chunks
|
||||||
rule = rule.substring(0, MAX_RULE_SIZE);
|
// rule = rule.substring(0, MAX_RULE_SIZE);
|
||||||
rule += F("...");
|
// rule += F("...");
|
||||||
}
|
}
|
||||||
Response_P(PSTR("{\"%s%d\":{\"State\":\"%s\",\"Once\":\"%s\",\"StopOnError\":\"%s\",\"Length\":%d,\"Free\":%d,\"Rules\":\"%s\"}}"),
|
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)),
|
XdrvMailbox.command, index, GetStateText(bitRead(Settings->rule_enabled, index -1)), GetStateText(bitRead(Settings->rule_once, index -1)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user