Page MenuHomePhabricator

$1 in message editsectionhint shouldn't be parsed
Closed, ResolvedPublic

Description

In this message, if $1 contains a template call (also magic words etc.), it shouldn't be expanded. (If a template call can be passed in, it must be already escaped somehow, eg., with <nowiki>). See http://zh.wikipedia.org/w/index.php?title=Wikipedia:%E6%B2%99%E7%9B%92&oldid=18527982


Version: unspecified
Severity: normal

Details

Reference
bz32802

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:00 AM
bzimport set Reference to bz32802.
bzimport added a subscriber: Unknown Object (MLST).

Can you point out exactly what on those pages looks wrong?

(In reply to comment #2)

Can you point out exactly what on those pages looks wrong?

See the tooltip of the "edit" link of the section and compare it with the section title.

There is no section edit link on old page views such as your sample URLs.

If I go to the current version of https://zh.wikipedia.org/wiki/Wikipedia:%E6%B2%99%E7%9B%92, I see:

Source: =测试区=
Section title: 测试区
Edit link tooltip: 编辑段落:测试区

which seems entirely consistent.

(In reply to comment #4)

There is no section edit link on old page views such as your sample URLs.

If I go to the current version of
https://zh.wikipedia.org/wiki/Wikipedia:%E6%B2%99%E7%9B%92, I see:

Source: =测试区=
Section title: 测试区
Edit link tooltip: 编辑段落:测试区

which seems entirely consistent.

I forgot that old pages do not have edit links. Those revisions are specially designed. You can copy their source to a currect page (not restricted to zhwiki) and see the bug.

jelle.zijlstra wrote:

Patch (didn't test whether this breaks other stuff)

See https://en.wikipedia.org/wiki/User:Ucucha/bug32802 for another example. The "title" attribute for the editsection link is "Edit section: foo ==Notice of discussion at the Administrators' Noticeboard == Hello. This message is being sent to inform you that there is currently a discussion at [[Wikipedia:Administrators' noticeboard/Incidents]] regarding an issue with which you may have been involved. Thank you. bar", which expands the ANI-notice template.

I've attached a simple patch that fixes this issue on my local installation of MW trunk. I haven't been able to run parser tests, so I'm not sure whether this may break other stuff.

attachment bug32802.patch ignored as obsolete

Created attachment 9915
Patch to fix the issue

(In reply to comment #6)

I've attached a simple patch that fixes this issue on my local installation of
MW trunk. I haven't been able to run parser tests, so I'm not sure whether this
may break other stuff.

It causes a regression of bug 25462. I've attached a patch that seems to work correctly.

Attached:

sumanah wrote:

Brad, sorry for the wait; there's been a bit of a delay in the review of patches here. As we prepare to get a new version out, we're in a "code slush" during which we concentrate on reviewing code that has already been committed to our source code repository (see
http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/57950 for
more details).

Thanks for your patch, and I hope to get it reviewed soon.

I see that this bug is addressed in r112395 and related to Bug 34528. I am not able to reproduce it the issue mentioned. I am closing it now.

(In reply to comment #9)

I see that this bug is addressed in r112395 and related to Bug 34528. I am not
able to reproduce it the issue mentioned. I am closing it now.

Yeah I think this is actually fixed in that commit.