diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2017-03-27 17:46:11 +0100 |
---|---|---|
committer | Ricardo Constantino <wiiaboo@gmail.com> | 2017-03-27 18:00:56 +0100 |
commit | 07ee7fb2c3495dac114e0028f8e2a8b1ae726add (patch) | |
tree | 84e94a1535959e69b08e2f5c6f34efd7019cd09f /player | |
parent | dc00ad537f74dc6010afdc5c4f03a32a8bf2793a (diff) | |
download | mpv-07ee7fb2c3495dac114e0028f8e2a8b1ae726add.tar.bz2 mpv-07ee7fb2c3495dac114e0028f8e2a8b1ae726add.tar.xz |
osc: escape ASS and strip newlines on title
Diffstat (limited to 'player')
-rw-r--r-- | player/lua/osc.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 569bb208ac..ff2d166897 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -1514,6 +1514,8 @@ function osc_init() ne.content = function () local title = mp.command_native({"expand-text", user_opts.title}) + -- escape ASS, and strip newlines and trailing slashes + title = title:gsub("\\n", " "):gsub("\\$", ""):gsub("{","\\{") return not (title == "") and title or "mpv" end |