If a vocabulary contain the & character, when selecting a line from the drop down menu, the & character is reformated to &

Steps to reproduce the issue:
-Use below attached 'vocabulary.csv' file to create a taxiselect.
-Associate a taxonomy with the content type.
-Create a new page at /node/add/*
-Type in the following inside the taxiselect field:
Item b
-The taxiselect dropdown menu will display a list of lines.
-Select the following line:
Item 1 >> Item 2 & Item b
-The following line will be added into to taxiselect field:
Item 1 >> Item 2 & Item b
Expected result is to insert the following line as is. Without reformatting the character &:
Item 1 >> Item 2 & Item b
-Save the page anyway. Even if it contains the symbole &
-Close the page.
-Edit the same page again at node/*/edit. Notice that the taxifield is now empty. Expected result is the taxiselect field should display the previously saved item.

Note: The 'vocabulary.csv' file couldn't be attached so I had to zip it.

Comments

francewhoa’s picture

StatusFileSize
new197 bytes

Ignore previous attached file. This one should be use instead.

alan d.’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Assigned: Unassigned » alan d.
Status: Active » Needs review

I've committed a new DEV version that mirrors 6.0 release. Please test / review and I'll push this into production.

francewhoa’s picture

Status: Needs review » Reviewed & tested by the community

It works. Thanks Alan.

Another good news. I tested the following characters and they work too:

! @ # $ ^ & * ( ) _ - + = [ ] { } \ ; ' " : . / < > ?

I did all testing with 6.x-1.x-dev (2009-Jul-21).

francewhoa’s picture

Status: Reviewed & tested by the community » Active

The character comma , doesn't work. Same thing as character &. But taxiselect uses comma separate list so maybe this one can’t be fix?

Testing with 6.x-1.x-dev (2009-Jul-21).

francewhoa’s picture

StatusFileSize
new211 bytes
new42.62 KB

Another bad news is the character % returns an browser popup error. Find attached screenshot to clarify.

Steps to reproduce the issue:
-Use attached vocabulary.
-In taxiselect field type in 33%. After pressing % key the browser returns a error popup window. Find attached screenshot to clarify. Expecting result is no error popup.
-Click on OK button.
-Click on SAVE button.
-Edit the same content again. The taxiselect field is empty. Expected result is displaying the following line inside the taxiselect field.
Item 2, Item 2b dolor 33%

Testing with:
-Taxiselect 6.x-1.x-dev (2009-Jul-21)
-Firefox 3
-Internet Explorer 7
-All of the above on Windows XP

I would be happy to contribute more testing.

alan d.’s picture

Looks like the terms will need to be escaped into a quoted string. I'll have another look this weekend. (maybe earlier if I find the time)

Thanks for the report / testing

Cheers

Alan

alan d.’s picture

Very strange, I can not replicate using the latest dev snapshot.

One side effect of using the % character is that it acts as a wild card search, but it didn't cause any issues. I'm running MySQL 5 and Drupal 6.12, another db may have problems.

francewhoa’s picture

Is your vocabulary the same as attached screenshot 'taxonomy-screenshoot.png'?

Have you try typing only the following inside the Taxiselect field? With nothing before and nothing after?

33%

If I type the following inside the Taxiselect field no error will be return.

dolor

If I type the following inside the Taxiselect field no error will be return.

Item 2b

I thought maybe the issue was only on Windows but I did more testing with Ubuntu 8.04 and got the same popup error as comment #5.

Testing with:
-Drupal 6.13
-MySQL 5 (Find attached screenshot for detail 'drupal-report-page.png')
-Taxiselect 6.x-1.x-dev (2009-Jul-21)
-Firefox 3
-Galeon 2.0.4
-All of the above on Ubuntu 8.04 LTS Desktop

francewhoa’s picture

About comment #4. I have open feature request related to the comma , character. The feature request is to automatically add delimiter around each term. Read more at http://drupal.org/node/530912

alan d.’s picture

Status: Active » Needs review

Packaged up a new dev module with changes.

See http://drupal.org/cvs?commit=247960 for details. A cache flush is required. (via update.php, visiting the menu admin section, devel, or admin menu)

francewhoa’s picture

Great. Thanks Alan. I'll try testing the '&' character next week. I'll post my result here.

francewhoa’s picture

Status: Needs review » Fixed

It works. Thanks Alan.

Tested with:
-Drupal 6.13
-content_taxonomy [6.x-1.x-dev 2009-Jul-15]
-cck 2.5
-Two TaxiSelect on the same page.
-Windows XP
-Firefox 3

alan d.’s picture

Cool. I recycled Drupals core functionality ;)

I'll mark the other related issue as fixed too, but I'll wait a week or two before pushing thought the official release. It'll be a few weeks before the next branch is ready to have a dev version released.

Cheers for the testing

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.