Mailing List Archive

Something just broke with character references.
Inside ampersands that are part of character references inside <pre> ...
</pre> are now being translated to &amp; as though they're not a part of an
explicit character reference. I'm experiencing this at [[m:Wikitax]].

For example, try doing:

<pre>
&lt;pre&gt; ... &lt;/pre&gt;
</pre>

Okay, I'm done now,

Derek

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
Re: Something just broke with character references. [ In reply to ]
On mer, 2003-01-01 at 19:08, Derek Moore wrote:
> Inside ampersands that are part of character references inside <pre> ...
> </pre> are now being translated to &amp; as though they're not a part of an
> explicit character reference. I'm experiencing this at [[m:Wikitax]].

Should be back.

While fixing other things, I accidentally overwrote OutputPage.php with
the (partially) tex-enabled version, which apparently handles <pre> tags
in a broken way. I'll go fix that.

-- brion
Re: Something just broke with character references. [ In reply to ]
On Wed, Jan 01, 2003 at 09:46:12PM -0800, Brion Vibber wrote:
> On mer, 2003-01-01 at 19:08, Derek Moore wrote:
> > Inside ampersands that are part of character references inside <pre> ...
> > </pre> are now being translated to &amp; as though they're not a part of an
> > explicit character reference. I'm experiencing this at [[m:Wikitax]].
>
> Should be back.
>
> While fixing other things, I accidentally overwrote OutputPage.php with
> the (partially) tex-enabled version, which apparently handles <pre> tags
> in a broken way. I'll go fix that.

But it should do it that way. <pre> is for raw code listings, and
Wikipedia software should neither interpret anything inside it
nor leave any HTML characters unescaped.
Re: Something just broke with character references. [ In reply to ]
>But it should do it that way. <pre> is for raw code listings, and
>Wikipedia software should neither interpret anything inside it
>nor leave any HTML characters unescaped.

I disagree. <pre> is for preformatted text, not literal text. <nowiki> is
for literal text. <pre> + <nowiki> is for preformatted, literal text.
Otherwise you can't have [[...]]-style wiki links inside a <pre> block,
which is something people might want, among other things. <pre> in
Wikipedia should operate like <pre> in the rest of the world, if we want
usin' Wikipedia to be natural and inuitive, that is.

How else would you propose being able to do the equivalent of:

<pre>
&lt;pre&gt;
a preformatted
block of text is
looks quite like this
&lt;/pre&gt;
</pre>

if <pre> operated as you suggest?

Derek

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
Re: Something just broke with character references. [ In reply to ]
On Thu, Jan 02, 2003 at 08:53:02AM -0600, Derek Moore wrote:
> >But it should do it that way. <pre> is for raw code listings, and
> >Wikipedia software should neither interpret anything inside it
> >nor leave any HTML characters unescaped.
>
> I disagree. <pre> is for preformatted text, not literal text. <nowiki> is
> for literal text. <pre> + <nowiki> is for preformatted, literal text.
> Otherwise you can't have [[...]]-style wiki links inside a <pre> block,
> which is something people might want, among other things. <pre> in
> Wikipedia should operate like <pre> in the rest of the world, if we want
> usin' Wikipedia to be natural and inuitive, that is.
>
> How else would you propose being able to do the equivalent of:
>
> <pre>
> &lt;pre&gt;
> a preformatted
> block of text is
> looks quite like this
> &lt;/pre&gt;
> </pre>
>
> if <pre> operated as you suggest?

It worked like what I'm saying in UseMod (and phase 2), then upgrade
broke it, and restoring old behaviour was requested to make Polish
Wikipedia work correctly again.

You use spaces in first column if you want to have Wiki markup with
preformated text.

Brion, please reapply that fix.
Re: Something just broke with character references. [ In reply to ]
>It worked like what I'm saying in UseMod (and phase 2), then upgrade
>broke it, and restoring old behaviour was requested to make Polish
>Wikipedia work correctly again.

Ah. Annoying inherited traditions.

>You use spaces in first column if you want to have Wiki markup with
>preformated text.

Oh, yeah. I keep forgettin' about that. *grin*

Well, while I was figurin' all this out, I found a bug. Check out
<http://test.wikipedia.org/wiki/Sandbox>. Edit the page, and insert a space
at the beginning of the first line, then save. Now edit the page again, and
put the disappearing space back and try to pad the top of the page with a
bunch o' blank lines, then save again. Go back into edit, and the blank
lines and space have disappeared. It appears Wikipedia doesn't like
preformatted text so long as it's at the top of a page or with no text above
it.

Derek

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*
http://join.msn.com/?page=features/virus
Re: Something just broke with character references. [ In reply to ]
Derek Moore wrote:

> Well, while I was figurin' all this out, I found a bug. Check out
> <http://test.wikipedia.org/wiki/Sandbox>. Edit the page, and insert a
> space at the beginning of the first line, then save. Now edit the
> page again, and put the disappearing space back and try to pad the top
> of the page with a bunch o' blank lines, then save again. Go back
> into edit, and the blank lines and space have disappeared. It appears
> Wikipedia doesn't like preformatted text so long as it's at the top of
> a page or with no text above it.

No bug. On saving, it removesblank lines and spaces at the beginning and
end of the article.Leading blank lines (and the ones at the end, too)
look ugly, and removing them saves disk space ;-)

Magnus
Re: Something just broke with character references. [ In reply to ]
>No bug. On saving, it removesblank lines and spaces at the beginning and
>end of the article.Leading blank lines (and the ones at the end, too) look
>ugly, and removing them saves disk space ;-)

Ah, so you just can't have articles that begin with preformatted text.
*grin* I understand removing blank lines; but in a generic, general sense,
it's probably a good idea to allow articles the ability to start out with
preformatted text.

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
Re: Something just broke with character references. [ In reply to ]
On ĵaŭ, 2003-01-02 at 09:50, Magnus Manske wrote:
> Derek Moore wrote:
> > Edit the page, and insert a
> > space at the beginning of the first line, then save. Now edit the
> > page again, and put the disappearing space back and try to pad the top
>
> No bug. On saving, it removesblank lines and spaces at the beginning and
> end of the article.Leading blank lines (and the ones at the end, too)
> look ugly, and removing them saves disk space ;-)

The automatic trimming was added specifically to kill trailing newlines
inserted automatically by some web browsers on edit; leading blank
spaces at the beginning can be legitimate and eating them is an
unintended behavior. If there's no objection I'll change the trim() to
rtrim().

-- brion vibber (brion @ pobox.com)
Re: Something just broke with character references. [ In reply to ]
On ĵaŭ, 2003-01-02 at 07:13, Tomasz Wegrzanowski wrote:
> It worked like what I'm saying in UseMod (and phase 2), then upgrade
> broke it, and restoring old behaviour was requested to make Polish
> Wikipedia work correctly again.

No. In both UseMod and phase 2, <pre>...</pre> sections _did_ allow
character references, while escaping out wiki markup and HTML tags into
plaintext.

If you wish to restore the old behavior, character references should be
allowed.

> You use spaces in first column if you want to have Wiki markup with
> preformated text.

Yup.

-- brion vibber (brion @ pobox.com)