Project

General

Profile

Bug #3079

Autorec / EPG - regex special character "^" not escaped from episode title

Added by g siviero about 9 years ago. Updated about 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
EPG
Target version:
-
Start date:
2015-09-15
Due date:
% Done:

100%

Estimated time:
Found in version:
3.4 and 4.1-360~g0916e52 (but also present in latest source)
Affected Versions:

Description

Hello everyone,

I am using two different versions of thveandend (3.4 on a raspberry Pi, 4.1-360~g0916e52 on a QNAP NAS).
Recently I stumbled upon a curious issue with the "Autorec" function.

Here in Italy sometimes when a new tv program is transmitted for the first time its title may contain "PRIMA TV" or "1^a TV" or something like that.
So when I added a new series with the autorec function I had a new DVR autorec entry but no episode added to the upcoming recordings list.
The title added with the autorec function didn't match the episode title.

Because... the function didn't automatically add the escape character before the "^" character (which is a regex special character meaning "starts with").
I manually added the escape "\" character and the episodes were added to the upcoming recordings list.

So I would like to ask the maintainers if you could edit the file

src/utils.c

In particular the function

regexp_escape(const char* str)

...
switch (a) {
case '?':
case '+':
case '.':
case '(':
case ')':
case '[':
case ']':
case '
':
...

to ADD this case:
case '^':

so that this special character is correctly managed and escaped.

Thanks

History

#1

Updated by Jaroslav Kysela about 9 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|99edd68c3782add6d747e901a5c4c88bce3ee25a.

Also available in: Atom PDF