dsh-unlag 1.9.103 → 1.9.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +7 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -236,7 +236,13 @@ function settingsOf(config) {
236
236
  * also be arbitrarily long, and the log is one line per event.
237
237
  */
238
238
  export function oneLine(value, limit = 2000) {
239
- const text = String(value ?? '').replace(/[\r\n\u2028\u2029]+/gu, ' ')
239
+ // A line break is not the only thing that forges a log line: an escape sequence can move the
240
+ // cursor and paint over earlier lines when a person reads the file, and a bare control byte can
241
+ // make a terminal misbehave. Page-supplied text reaches this function, so every control character
242
+ // that is not a plain space goes, not just the newlines.
243
+ const text = String(value ?? '')
244
+ .replace(/[\r\n\u2028\u2029]+/gu, ' ')
245
+ .replace(/[\u0000-\u001f\u007f-\u009f]+/gu, ' ')
240
246
  return text.length > limit ? `${text.slice(0, limit)}\u2026` : text
241
247
  }
242
248
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.103",
3
+ "version": "1.9.105",
4
4
  "type": "module",
5
5
  "description": "A press applies plugin edits right away and brings a laggy interface back; automatic reloading stays off unless you turn it on, so the press is the only trigger, and nothing restarts.",
6
6
  "license": "MIT",