diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index b05b2710..d362d5f0 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -764,6 +764,7 @@ tvheadend.epg = function() { function clicked(column, grid, index, e) { if (column.dataIndex === 'title') { var value = grid.getStore().getAt(index).data[column.dataIndex]; + value = tvheadend.regexEscape(value); if (value && epgStore.baseParams.title !== value) { epgFilterTitle.setValue(value); return false; diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 1cd00328..e8b50519 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -10,6 +10,10 @@ Ext.state.Manager.setProvider(new Ext.state.CookieProvider({ expires: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 7)) })); +tvheadend.regexEscape = function(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); +} + /** * Displays a help popup window */