From 6c3d25e6f5f09a110ad0fffaeeea6a65ee5d228b Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 18 Sep 2014 00:49:55 +0200 Subject: command: allow using ASS tags on OSD messages We don't allow this by default, because it would be silly if random external data (like filenames or file tags) could accidentally trigger them. Add a property that magically disables this ASS tag escaping. Note that malicious input could still disable ASS tag escaping by itself. This would be annoying but harmless. --- DOCS/man/input.rst | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'DOCS/man/input.rst') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 8afcd846ec..aae4d0a783 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1298,8 +1298,25 @@ Property list ``osd-sym-cc`` Inserts the current OSD symbol as opaque OSD control code (cc). This makes - sense with the ``show_text`` command only. The control code is - implementation specific and is useless for any other use. + sense only with the ``show_text`` command or options which set OSD messages. + The control code is implementation specific and is useless for anything else. + +``osd-ass-cc`` + ``${osd-ass-cc/0}`` disables escaping ASS sequences of text in OSD, + ``${osd-ass-cc/1}`` enables it again. By default, ASS sequences are + escaped to avoid accidental formatting, and this property can disable + this behavior. Note that the properties return an opaque OSD control + code, which only makes sense for the ``show_text`` command or options + which set OSD messages. + + .. admonition:: Example + + --osd-status-msg='This is ${osd-ass-cc/0}{\\b1}bold text' + + Any ASS override tags as understood by libass can be used. + + Note that you need to escape the ``\`` character, because the string is + processed for C escape sequences before passing it to the OSD code. ``options/`` (RW) Read-only access to value of option ``--``. Most options can be -- cgit v1.2.3