Moodle

Wiki's with double quotes in their names produce broken links. Patch provided.

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: STABLE backlog
  • Component/s: Wiki (1.x)
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

It's possible to use quotes when defining a Wiki name. These quotes are passed intact when generating the View, Edit, Links, History, Attach tabs, resulting in a truncated link and the wrong wikipage being displayed.

The attached patch applies the htmlspecialchars to the ewiki_id, converting the double quotes into html entities, correcting the problem.

  1. view_patch1.8x.diff
    30/Jan/08 2:40 AM
    0.6 kB
    Matt Bockol
  2. view_patch1.9b4.diff
    30/Jan/08 2:41 AM
    0.6 kB
    Matt Bockol

Activity

Hide
Dan Marsden added a comment -

Hi Matt,

that diff seems to be back to front, and it doesn't solve the issue in 1.9 - have you missed anything from the patch?

thanks,

Dan

Show
Dan Marsden added a comment - Hi Matt, that diff seems to be back to front, and it doesn't solve the issue in 1.9 - have you missed anything from the patch? thanks, Dan
Hide
Matt Bockol added a comment -

Here's an updated patch with the file order set right.

Show
Matt Bockol added a comment - Here's an updated patch with the file order set right.
Hide
Matt Bockol added a comment -

Here's a patch for 1.9b4.

Show
Matt Bockol added a comment - Here's a patch for 1.9b4.
Hide
Matt Bockol added a comment -

The new patches should do the trick. I've testing in 1.9b4 and it seems to solve the problem there too.

Show
Matt Bockol added a comment - The new patches should do the trick. I've testing in 1.9b4 and it seems to solve the problem there too.
Hide
Dan Marsden added a comment -

ah- I have a different issue that is almost related..... - your patch breaks a function/expected behaviour of the wiki:
when creating a hyperlink to a wiki page. - the double quotes can be used to define the title:

enclose a www address or a WikiLink inside square brackets [Moodle] and assign it a neat title using quotation marks or the | character
title
[WikiWord "title"] or ["title for" WikiLink]

in Moodle 1.9, this isn't working correctly becuase "something" is translating " into " when it shouldn't......

Dan

Show
Dan Marsden added a comment - ah- I have a different issue that is almost related..... - your patch breaks a function/expected behaviour of the wiki: when creating a hyperlink to a wiki page. - the double quotes can be used to define the title: enclose a www address or a WikiLink inside square brackets [Moodle] and assign it a neat title using quotation marks or the | character title [WikiWord "title"] or ["title for" WikiLink] in Moodle 1.9, this isn't working correctly becuase "something" is translating " into " when it shouldn't...... Dan
Hide
Martin Dougiamas added a comment -

So what should we do?

Show
Martin Dougiamas added a comment - So what should we do?
Hide
Dan Marsden added a comment -

I would think about no longer supporting thesyntax:
[WikiWord "title"] or ["title for" WikiLink]
and only supporting the syntax
title

I haven't had a chance to look/test the new wikis - are both these styles supported in NWiki and OU wiki? - if not maybe we could stop using the style with quotes now?

Dan

Show
Dan Marsden added a comment - I would think about no longer supporting thesyntax: [WikiWord "title"] or ["title for" WikiLink] and only supporting the syntax title I haven't had a chance to look/test the new wikis - are both these styles supported in NWiki and OU wiki? - if not maybe we could stop using the style with quotes now? Dan
Hide
Dan Poltawski added a comment -

I think Martin meant to assign this to the other Dan

Show
Dan Poltawski added a comment - I think Martin meant to assign this to the other Dan

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: