SIGN IN SIGN UP

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.
G
Guido Cella committed
d6610a5b2f34e398e2ceba2a4da2b79e556b1c9e
Parent: 520849d
Committed by Kacper Michajłow <kasper93@gmail.com> on 3/21/2024, 2:20:14 AM