David Friedland | 1 Jun 06:42 2005
Picon

Re: Feature addition to the gallery

Ed W wrote:
> Do you mean this bug:
> http://bugzilla.wikimedia.org/show_bug.cgi?id=684
> 
> What's wrong with the code as is?  Looks great to me?
> 
> Please advise what's wrong and I will fix it up - seems great for my 
> purpose
> 
> Thanks
> 
> Ed W

I wrote this patch. I stopped working on it after a cold reception--my 
contributions weren't met with much enthusiasm so I stopped pursuing 
trying to make them.

Brion wants it changed to not allow \' and \" as escapes for ' and " 
inside quoted strings and to not allow whitespace between the opening < 
and the name of the tag.

Also, Ævar notes that the patch doesn't work on the current HEAD, as the 
code the patch applies to has probably changed since the patch was 
written, so it needs some cleaning up.

Hope that helps. Good luck.

- David Friedland
Ed W | 1 Jun 13:34 2005

Re: Re: Feature addition to the gallery


> Brion wants it changed to not allow \' and \" as escapes for ' and " 
> inside quoted strings and to not allow whitespace between the opening 
> < and the name of the tag.

Brion,

I read this comment on the bugzilla.  Whilst I agree that "&quot;" 
should be supported I am a little unsure what is wrong with supporting 
the \" syntax? 

Personally I dont do a lot of web development and my first instinct 
would have been to reach for \" to put quotes within quotes.  Surely the 
goal is to have a syntax which is understandable to the general public?

Lets be clear though.  Are we talking about stuff like the following:

<gallery caption="Ed said: \"Here is my gallery\"">

Which you think should *only* be allowed as:

<gallery caption="Ed said: &quot;Here is my gallery&quot;">

The former doesn't feel "inconsistent" to me? (But I am not a hardcore 
web worker)

Can we not compromise and offer both syntax?  Either way it seems like a 
small detail which is holding back an otherwise very useful patch that 
seems quite low risk.  Eyeballing the patch it looks fairly 
selfcontained, although my first thought is that we only need the one 
(Continue reading)

Brion Vibber | 1 Jun 22:51 2005
Picon

Re: Re: Feature addition to the gallery

Ed W wrote:
>> Brion wants it changed to not allow \' and \" as escapes for ' and "
>> inside quoted strings and to not allow whitespace between the opening
>> < and the name of the tag.
>
> I read this comment on the bugzilla.  Whilst I agree that "&quot;"
> should be supported I am a little unsure what is wrong with supporting
> the \" syntax?

If we're using HTML/XML syntax for extension hooks (and we are), then it
must behave consistently with the HTML/XML elements we allow. Why would
\" be magic in some places and not others?

-- brion vibber (brion  <at>  pobox.com)
_______________________________________________
Wikitech-l mailing list
Wikitech-l <at> wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Ed W | 2 Jun 13:21 2005

Re: Re: Feature addition to the gallery


> If we're using HTML/XML syntax for extension hooks (and we are), then it
> must behave consistently with the HTML/XML elements we allow. Why would
> \" be magic in some places and not others?

Idiot question, but what other examples of places "doesn't" it work? I 
can't think I have run up against this issue in normal usage?  I would 
probably run up against it in my gallery example though

Might it not be interesting to support this syntax more widely then?

Either way: if we agree on the quotes thing can we pop the rest of the 
code in?

Ed W
Magnus Manske | 2 Jun 13:40 2005
Picon

Re: Re: Feature addition to the gallery


Ed W schrieb:
> Either way: if we agree on the quotes thing can we pop the rest of the
> code in?

My way of getting round these "fine, except for..." issues is to add Yet
Another Global Variable (tm), like

	$wgAllowBackslashQuotes = true

Put this in DefaultSettings.php, so the actual decision (in
LocalSettings.php) is the problem of the admin, not the programmer ;-)

Magnus
Ævar Arnfjörð Bjarmason | 1 Jun 23:01 2005
Picon

Re: Re: Feature addition to the gallery

> I wrote this patch. I stopped working on it after a cold reception--my
> contributions weren't met with much enthusiasm so I stopped pursuing
> trying to make them.

Well I for one would like to see it happen.

> Also, Ævar notes that the patch doesn't work on the current HEAD, as the
> code the patch applies to has probably changed since the patch was
> written, so it needs some cleaning up.

Well it's pretty hard to apply a patch that doesn't work;)
David Friedland | 4 Jun 00:09 2005
Picon

Re: Feature addition to the gallery

Just so everyone knows, Brion made some modifications to the patch to 
make it exhibit the desired behavior, as well as to use some utility 
functions from the Sanitizer package, and checked it into HEAD last night.

Bug message from Brion: 
<http://bugzilla.wikimedia.org/show_bug.cgi?id=684#c18>

Diff of Parser.php from CVS: 
<http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/includes/Parser.php?r1=1.446&r2=1.447>

Thanks Brion!

- David

David Friedland wrote:
> Ed W wrote:
> 
>> Do you mean this bug:
>> http://bugzilla.wikimedia.org/show_bug.cgi?id=684
>>
>> What's wrong with the code as is?  Looks great to me?
>>
>> Please advise what's wrong and I will fix it up - seems great for my 
>> purpose
>>
>> Thanks
>>
>> Ed W
> 
> 
(Continue reading)

Ed W | 4 Jun 10:39 2005

Re: Re: Feature addition to the gallery

David Friedland wrote:

> Just so everyone knows, Brion made some modifications to the patch to 
> make it exhibit the desired behavior, as well as to use some utility 
> functions from the Sanitizer package, and checked it into HEAD last 
> night.
>
> Bug message from Brion: 
> <http://bugzilla.wikimedia.org/show_bug.cgi?id=684#c18>
>
> Diff of Parser.php from CVS: 
>
<http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/includes/Parser.php?r1=1.446&r2=1.447> 
>
>
> Thanks Brion!

Excellent!  That looks splendid.

Thanks Brion!

OK, everyone, lets code something useful with this now! 

Ed W

Gmane