summaryrefslogtreecommitdiffstats
path: root/DOCS/interface-changes/escape-ass.txt
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2022-05-01 07:29:32 +0200
committerKacper Michajłow <kasper93@gmail.com>2024-03-21 03:20:14 +0100
commitd6610a5b2f34e398e2ceba2a4da2b79e556b1c9e (patch)
treecb5d6e8777179a4383067e05c52467d198096912 /DOCS/interface-changes/escape-ass.txt
parent520849dd48e34e68be09b5f4849fea1d5212fb44 (diff)
downloadmpv-d6610a5b2f34e398e2ceba2a4da2b79e556b1c9e.tar.bz2
mpv-d6610a5b2f34e398e2ceba2a4da2b79e556b1c9e.tar.xz
command: add escape-ass
This adds a command to escape ASS tags to remove code duplication between sub/osd_libass.c, console.lua, osc.lua, stats.lua and any user script that calls mp.create_osd_overlay(). A command is used instead of scripting functions so that all clients can use this and not just use Lua and JS ones. osd_mangle_ass() also interprets osd-sym-cc and osd-ass-cc/{0,1}, but since they use invalid UTF-8 characters there is no risk of escape-ass users using them by accident, like with any OSD message. Always replacing \n with \\N in mangle_ass() even when it is not called by escape-ass doesn't seem to cause any issue, but I made it conditional anyway to avoid changing how all OSD messages are treated unnecessarily.
Diffstat (limited to 'DOCS/interface-changes/escape-ass.txt')
-rw-r--r--DOCS/interface-changes/escape-ass.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/DOCS/interface-changes/escape-ass.txt b/DOCS/interface-changes/escape-ass.txt
new file mode 100644
index 0000000000..93ec1ca5e5
--- /dev/null
+++ b/DOCS/interface-changes/escape-ass.txt
@@ -0,0 +1 @@
+add the `escape-ass` command