This repository has been archived by the owner on Jan 28, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a couple of issues with telegrams (beeps and HTML tags)
I noticed that beep chars (ASCII 7), which come in some telegrams (e.g. SBBSecho notices) were being printed as a box glyph in the web UI. Strip those before emitting the telegram event. I also noticed that some text was missing from some telegrams (e.g. <user@addr> portion of email notices) - this was because the <> chars weren't be html-entity-encoded. So now I'm using html_encode() to HTML-entity encode the string (not the white-space) and stripping the Ctrl-A codes here. It would be kind of cool if the colors in the telegrams could be retained/displayed, but html_encode sets the background of the text to black, which doesn't look so hot with the current theme and stuff. We might want to revisit that (e.g. not strip the Ctrl-A chars here but rather let html_encode() tranlsate them to HTML color sequences). Another thing I noticed, if a telegram doesn't end in a CRLF, the web UI doesn't automatically add/display a <br>. It probably should (just in case). All telegrams should end in a CRLF, but you never know.
- Loading branch information