Topic: BUG: HTML Entity Display

Hi Roel,

Just uncovered another of those minor technical issues. I have a recurring event title "Coffee & Chat". This displays fine in the main calender displays and the "Edit Event" window.

However, I did a search for "mp" just now and the results screen included a lot of entries with

Coffee & Chat

in the results screen. I guess this might affect certain other characters as well.

Re: BUG: HTML Entity Display

Hi Greg,

Yes, you are right.
MySQL and SQLite have no functions to convert HTML entities or ignore HTML tags.
It could be done by using multiple REPLACE functions, but replacing all possible HTML entities in all fields to be searched still doesn't solve the problem with HTML tags.
It could be done by regular expressions, but to deal with all entities and tags, it would require a very complicated expression.

Since the search results are very volatile (just for the eyes) and the search criteria can be easily changed, I think it's not worth making the search algorithm much more complicated..

Roel

Re: BUG: HTML Entity Display

Roel,

I know search can be a nightmare for any script. Some require a minimum number of characters, example three.

With some scripts, or as with Google, an exact match can be set by enclosing the search within quotes. Of course with a search such as "mp" it is a match with & where the search " mp " wouldn't match since there isn't a space before and after the mp.

The help section for the Search Function is quite good. Perhaps a slight update to the help section for how the search function works and doesn't work with html codes will help people to make it effective in finding what they are looking for.

Regards,
Dan

Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html

Re: BUG: HTML Entity Display

Hi Roel,

Once gain, thanks for the explanation though it might be worth pointing out the reason for the particular search I made that uncovered the bug.

MP is used extensively in our calendar as it is the abbreviation for Member of Parliament and our local MP has regular bookings at our premises. The computer naive would be at a loss to understand why they kept seeing a lot of "Coffee and Chat" responses in their search results and why &" appeared where "and" should be!

Given the work involved when considering multiple languages (which hadn't occurred to me would be part of the problem when I raised the issue), I fully understand your reluctance to see the issue as a priority.

Certainly for we Brits, there are few symbols we're likely to need translated and I'm not seeing a problem with e-acute in café in our calendar which is the only other unusual character my folk are likely to use.

Re: BUG: HTML Entity Display

NorfolkGreg wrote:

Hi Roel,

MP is used extensively in our calendar as it is the abbreviation for Member of Parliament and our local MP has regular bookings at our premises. The computer naive would be at a loss to understand why they kept seeing a lot of "Coffee and Chat" responses in their search results and why &" appeared where "and" should be!

Being in Canada we have the PM (Prime Minister) as well as MP's. Of course we also have, as the U.S. does, two letter abbreviations for Provinces  / States. I think that is why many searches have a minimum of three characters in a search.

On a technical note; M.P. would be proper. Due to laziness many have dropped the dots between the letters when writing / typing them out.

As a trivial point, MP is also Military Police.

Dan

Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html

Re: BUG: HTML Entity Display

Hi Dan,

I now realise it was silly of me to think that MP might be an uncommon search term.

However, I think my main point holds true, that the computer naive might wonder why "amp;" should be added to the legitimate ampersand within "Coffee & Chat" and what made those four additional unwanted characters appear there anyway!

However, now I see that the problem is a whole lot bigger than I imagined and I am sympathetic to the view that it is not a priority to fix.