Tags with special characters aren't found

Bug #1705126 reported by David Truong
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Cecilia Vela Gurovic

Bug Description

Im on 17.04.2.

When on "My Tags" page (/tags.php), clicking on a tag with special characters to search for it returns nothing. This is because in the query, the special characters are replaced. The tag block is affected by this as well, but only on the "My Tags" page. It works well on the other page such as Journals and Pages and Collections.

I found this by having the tag #test. When I search for it from the "My Tags" page, the page shows "Search results for %23test"

So far, i've confirmed the problem with:
# -> %23
@ -> %40
é -> %C3%A9
è -> %C3%A8
ê -> %C3%AA

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

And here's a screenshot

Changed in mahara:
status: New → Confirmed
importance: Undecided → High
milestone: none → 17.10.0
Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/7909

Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

For testing also check:

1. When we have a tag '&onetag' and add a Tagged journal entries block to a page, the block will show no entries even if we have one, displaying the message:
  There are no journal entries tagged "&onetag"
If we edit the block and save without changes, it will display the message:
  There are no journal entries tagged "&&onetag"
and it will continue to add "&" at the beginning of the tag for each time we save

2. If we set a tag like "<script>alert('Hello');</script>" and we select it in a Tagged journal entries block a javascript alert is displayed with text "Hello" and the tag is displayed as empty in the select field

Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7909
Committed: https://git.mahara.org/mahara/mahara/commit/fabee237bd7fd2250ea07a69308b1fe8f4544e0f
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit fabee237bd7fd2250ea07a69308b1fe8f4544e0f
Author: Cecilia Vela Gurovic <email address hidden>
Date: Tue Aug 1 13:25:12 2017 +1200

Bug 1705126: fix for tag encoding

Fix for tag search when they have a character changed by urlencoding()
Fix for tag display in Tagged posts block when tag has a character
changed by htmlspecialchar()
Fix for not executing javascript inside the text of a tag
Fix to delete blocktype_taggedposts_tags entries when deleting a
tagged posts block

behatnotneeded

Change-Id: Ic4a56ea90457e605c99203f0b355def93a04baa1

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/8094

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8094
Committed: https://git.mahara.org/mahara/mahara/commit/70ac7cec17e778da31d928ea37a7e2c7de13459f
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 70ac7cec17e778da31d928ea37a7e2c7de13459f
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu Oct 5 17:06:05 2017 +1300

Bug 1720269: old_raw patches for bugs: (General)

Bug 1720264
Bug 1720235
Bug 1719736
Bug 1718821
Bug 1705126
Bug 1694908
Bug 1690687
Bug 1690232
Bug 1686843
Bug 1685041
Bug 1683561
Bug 1681987
Bug 1681934
Bug 1675223
Bug 1636064
Bug 1575512
Bug 1369569
Bug 692769

Also fixing up un-closed html tags in Bug 1701437 for raw and old raw

behatnotneeded

Change-Id: I8ac930ceebf78b4edad97289994318e7689a1e94

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "17.10_STABLE" branch: https://reviews.mahara.org/8116

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8116
Committed: https://git.mahara.org/mahara/mahara/commit/a25f4f11d35bf17d54acfb8010cd29e432fc86ea
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit a25f4f11d35bf17d54acfb8010cd29e432fc86ea
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu Oct 5 17:06:05 2017 +1300

Bug 1720269: old_raw patches for bugs: (General)

Bug 1720264
Bug 1720235
Bug 1719736
Bug 1718821
Bug 1705126
Bug 1694908
Bug 1690687
Bug 1690232
Bug 1686843
Bug 1685041
Bug 1683561
Bug 1681987
Bug 1681934
Bug 1675223
Bug 1636064
Bug 1575512
Bug 1369569
Bug 692769

Also fixing up un-closed html tags in Bug 1701437 for raw and old raw

behatnotneeded

Change-Id: I8ac930ceebf78b4edad97289994318e7689a1e94
(cherry picked from commit 70ac7cec17e778da31d928ea37a7e2c7de13459f)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
Revision history for this message
Niranjan (niranjan528) wrote :

Pre condition:Make sure to create some tags with special characters such as #test, @table

1. Navigate to My tags page (/tags.php)

2. Click on one of the tags which have special character.

Expected Result: The search page should return all the pages which are associated with it

Actual Result: The search results are shown with different tags for example when we search for #test it is returning %25test

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.