A tiny bug in WebEPG parsing (1 Viewer)

Khurram

Portal Pro
May 12, 2008
211
5
Home Country
Pakistan Pakistan
I believe I have found a bug in WebEPG parsing. If the string that is selected by WebEPG based on the url and start plus end strings has the "<" character as its last character, WebEPG will not be able to find any program information. I have traced it in code and it seems that it tries to parse past the last < character to find which tag it belongs to. Obviously, there is no tag there as the string has already ended and WebEPG throws an error.

The obvious easy solution is to avoid start and end strings which will result in such strings. If someone is interested, the code to fix is in HtmlString.cs file in the TagList function. Just change the 3rd statement in the function from

if (source == '<')

to

if (source == '<' && i < source.Length-1)

By the way, I cant use the word sub-string (without the hyphen) in my post as it throws a "http 501 not implement/http 505 version not supported" error when I click on post or preview button :confused:
 

franky52

Portal Member
December 15, 2008
12
0
Home Country
Spain Spain
Hi!
Could this be the reason why I can't get info from the web I mentioned in my post??
Thanks for helping.
 

Khurram

Portal Pro
May 12, 2008
211
5
Home Country
Pakistan Pakistan
This is easy to check through WebEPG Designer. After filling in the url, start and end textboxes, just load the page and then check the "source" textbox. If the last character is the < sign, you will have this problem.
 

Users who are viewing this thread

Top Bottom