Adding block with underscore can cause problems

Bug #1971110 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned
20.10
Fix Released
High
Unassigned
21.04
Fix Released
High
Unassigned
21.10
Fix Released
High
Unassigned
22.04
Fix Released
High
Unassigned
22.10
Fix Released
High
Unassigned

Bug Description

The following test will give an error:

1) Create a new page
2) Add a new block
3) Change the 'Placeholder' title to 'Text_block'
4) Click on the Content type option 'Text'
5) Get an error like this:

Invalid page control action: id_X_new_1_blocktype_text_title_Text_block

The problem is the underscore in the title clashes with code that wants to work out what blocktype action is happening.

What we need to do is have the all the underscores in the title be turned into a url encoded values

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

Reviewed: https://reviews.mahara.org/c/mahara/+/12676
Committed: https://git.mahara.org/mahara/mahara/commit/771dab63b9e95c9ca0a97bad74d3078213902e86
Submitter: "Robert Lyon <email address hidden>"
Branch: main

commit 771dab63b9e95c9ca0a97bad74d3078213902e86
Author: Robert Lyon <email address hidden>
Date: Mon May 2 10:35:05 2022 +1200

Bug 1971110: Error with title underscore

Needs to URl encoded

Change-Id: I229335f5c06f54019ec6eb5dae7f8a3291993bb4
Signed-off-by: Robert Lyon <email address hidden>

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

Patch for "22.04_DEV" branch: https://reviews.mahara.org/c/mahara/+/12693

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "21.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/12694

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "21.04_DEV" branch: https://reviews.mahara.org/c/mahara/+/12695

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "20.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/12696

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

Reviewed: https://reviews.mahara.org/c/mahara/+/12693
Committed: https://git.mahara.org/mahara/mahara/commit/b59c2e4f13bac95390c95a4cd6347cdf1afad909
Submitter: "Robert Lyon <email address hidden>"
Branch: 22.04_DEV

commit b59c2e4f13bac95390c95a4cd6347cdf1afad909
Author: Robert Lyon <email address hidden>
Date: Mon May 2 10:35:05 2022 +1200

Bug 1971110: Error with title underscore

Needs to URl encoded

Change-Id: I229335f5c06f54019ec6eb5dae7f8a3291993bb4
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 771dab63b9e95c9ca0a97bad74d3078213902e86)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/c/mahara/+/12694
Committed: https://git.mahara.org/mahara/mahara/commit/e3913e7d840c1b2e2ad6ad493d37fd8a69f992f9
Submitter: "Robert Lyon <email address hidden>"
Branch: 21.10_DEV

commit e3913e7d840c1b2e2ad6ad493d37fd8a69f992f9
Author: Robert Lyon <email address hidden>
Date: Mon May 2 10:35:05 2022 +1200

Bug 1971110: Error with title underscore

Needs to URl encoded

Change-Id: I229335f5c06f54019ec6eb5dae7f8a3291993bb4
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 771dab63b9e95c9ca0a97bad74d3078213902e86)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/c/mahara/+/12695
Committed: https://git.mahara.org/mahara/mahara/commit/dc06635a3e9a315a0ac714f19d4c40db375d5fb0
Submitter: "Robert Lyon <email address hidden>"
Branch: 21.04_DEV

commit dc06635a3e9a315a0ac714f19d4c40db375d5fb0
Author: Robert Lyon <email address hidden>
Date: Mon May 2 10:35:05 2022 +1200

Bug 1971110: Error with title underscore

Needs to URl encoded

Change-Id: I229335f5c06f54019ec6eb5dae7f8a3291993bb4
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 771dab63b9e95c9ca0a97bad74d3078213902e86)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/c/mahara/+/12696
Committed: https://git.mahara.org/mahara/mahara/commit/5a454cd96f56aeb068c564628560275b84bd935f
Submitter: "Robert Lyon <email address hidden>"
Branch: 20.10_DEV

commit 5a454cd96f56aeb068c564628560275b84bd935f
Author: Robert Lyon <email address hidden>
Date: Mon May 2 10:35:05 2022 +1200

Bug 1971110: Error with title underscore

Needs to URl encoded

Change-Id: I229335f5c06f54019ec6eb5dae7f8a3291993bb4
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 771dab63b9e95c9ca0a97bad74d3078213902e86)

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.