WEBUI JS: epg grid - escape regex for title linking

This commit is contained in:
Jaroslav Kysela 2014-09-28 21:09:19 +02:00
parent 6352e3494c
commit f5872e72d0
2 changed files with 5 additions and 0 deletions

View file

@ -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;

View file

@ -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
*/