WEBUI JS: epg grid - escape regex for title linking
This commit is contained in:
parent
6352e3494c
commit
f5872e72d0
2 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue