Fixes #51574 - Added a whitespace sanitizing proc (#52350)

* Fixed #51574 - Added htmlrendertext and implemented it for the voice analyzer

* Made a htmlrendertext regex static

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>

* Made a htmlrendertext regex static again

Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
This commit is contained in:
Daniel Hultgren
2020-07-24 22:32:27 +02:00
committed by GitHub
co-authored by Bobbahbrown
parent 2a10831bbd
commit dd359582d4
2 changed files with 25 additions and 0 deletions
+4
View File
@@ -32,6 +32,10 @@
if(speaker == src)
return
// raw_message can contain multiple spaces between words etc which are not seen in chat due to HTML rendering
// this means if the teller records a message with e.g. double spaces or tabs, other people will not be able to trigger the sensor since they don't know how to perform the same combination
raw_message = htmlrendertext(raw_message)
if(listening && !radio_freq)
record_speech(speaker, raw_message, message_language)
else