Difference between revisions of "Issue:Magic word in titlematch is not escaped"

From FollowTheScore
Jump to: navigation, search
m (oops)
(solution, hopefully it doesn't break anything)
Line 13: Line 13:
  
 
:Ok, upon further investigation, this isn't really a dpl bug. <nowiki>{{PAGENAME}}</nowiki> et al. return an escaped title: Nx/sand&amp;#39;box --&nbsp;[[User:Nx|<span style="color:teal">'''''Nx'''''</span>]]&nbsp;/&nbsp;[[User talk:Nx|''talk'']] 13:18, 14 February 2010 (UTC)
 
:Ok, upon further investigation, this isn't really a dpl bug. <nowiki>{{PAGENAME}}</nowiki> et al. return an escaped title: Nx/sand&amp;#39;box --&nbsp;[[User:Nx|<span style="color:teal">'''''Nx'''''</span>]]&nbsp;/&nbsp;[[User talk:Nx|''talk'']] 13:18, 14 February 2010 (UTC)
 +
 +
 +
And the solution is to run Sanitizer:decodeCharReferences (this is what the Title:newFromText does too), e.g. in the foreach cycle:
 +
<pre>$link = Sanitizer::decodeCharReferences($link);</pre>
 +
--&nbsp;[[User:Nx|<span style="color:teal">'''''Nx'''''</span>]]&nbsp;/&nbsp;[[User talk:Nx|''talk'']] 13:37, 14 February 2010 (UTC)
  
 
== Reply ==
 
== Reply ==

Revision as of 14:37, 14 February 2010

Description:
Extension / Version: DPL   /   1.9.0
Type / Status: Bug   /   open

Problem

Observe: User:Nx/sand'box

The first query is correctly escaped, the second one, which uses {{PAGENAME}} is not. -- Nx / talk 12:14, 14 February 2010 (UTC)

Ok, upon further investigation, this isn't really a dpl bug. {{PAGENAME}} et al. return an escaped title: Nx/sand&#39;box -- Nx / talk 13:18, 14 February 2010 (UTC)


And the solution is to run Sanitizer:decodeCharReferences (this is what the Title:newFromText does too), e.g. in the foreach cycle:

$link = Sanitizer::decodeCharReferences($link);

-- Nx / talk 13:37, 14 February 2010 (UTC)

Reply