Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Re: [MediaWiki-CVS] SVN: [34167] trunk/phase3/includes/EditPage.php

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


roan.kattouw at home

May 6, 2008, 1:27 PM

Post #1 of 3 (251 views)
Permalink
Re: [MediaWiki-CVS] SVN: [34167] trunk/phase3/includes/EditPage.php

nikerabbit[at]svn.wikimedia.org schreef:
> + # Why we don't use Xml::element here?
> + # Is it because if $source is '', it returns <textarea />?
Yes. <textarea /> violates standards and renders very nastily in
Firefox: the rest of the HTML is treated as the textarea's content.

Roan Kattouw (Catrope)

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


brion at wikimedia

May 6, 2008, 3:57 PM

Post #2 of 3 (234 views)
Permalink
Re: [MediaWiki-CVS] SVN: [34167] trunk/phase3/includes/EditPage.php [In reply to]

Roan Kattouw wrote:
> nikerabbit[at]svn.wikimedia.org schreef:
>> + # Why we don't use Xml::element here?
>> + # Is it because if $source is '', it returns <textarea />?
> Yes. <textarea /> violates standards and renders very nastily in
> Firefox: the rest of the HTML is treated as the textarea's content.

Note that <textarea /> is perfectly good XHTML, but not compatible with
HTML -- where the <element/> form is meaningless and taken to mean
<element>.

Since we serve as text/html to be compatible with common browsers
(*cough IE cough*) we need to ensure that we only use the short
<element/> form for elements which are implicitly closed in HTML 4 (eg,
<br/> and <hr/> and <img/>). Anything that must be explicitly closed
needs to use the long form with separate opening and closing tags.

-- brion vibber (brion @ wikimedia.org)

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Simetrical+wikilist at gmail

May 6, 2008, 5:27 PM

Post #3 of 3 (232 views)
Permalink
Re: [MediaWiki-CVS] SVN: [34167] trunk/phase3/includes/EditPage.php [In reply to]

On Tue, May 6, 2008 at 4:27 PM, Roan Kattouw <roan.kattouw[at]home.nl> wrote:
> Yes. <textarea /> violates standards and renders very nastily in
> Firefox: the rest of the HTML is treated as the textarea's content.

<textarea /> should never be output by anything; elements like
<textarea> that can (in this case, must) have content should *always*
be output as <textarea></textarea>, for compatibility, although
theoretically they're identical. This recommendation is in fact part
of the XHTML 1.0 standard, as an informative compatibility guideline:

"Given an empty instance of an element whose content model is not
EMPTY (for example, an empty title or paragraph) do not use the
minimized form (e.g. use <p> </p> and not <p />)."
http://www.w3.org/TR/xhtml1/#C_3

Where we're using XHTML, I would suggest the Xml functions follow this
guideline automatically, unless that would cause conflicts with
non-XHTML uses of the functions (which I guess hypothetically could
exist?).

On Tue, May 6, 2008 at 6:57 PM, Brion Vibber <brion[at]wikimedia.org> wrote:
> Since we serve as text/html to be compatible with common browsers
> (*cough IE cough*) we need to ensure that we only use the short
> <element/> form for elements which are implicitly closed in HTML 4 (eg,
> <br/> and <hr/> and <img/>).

Last I checked, and Roan's e-mail confirms this, Firefox also barfs on
the trailing-slash format for empty elements, even with an XHTML
doctype. Or is your point that it doesn't, if the MIME type is for
XML?

Anyway, I don't think we would want to serve with an XML MIME type
even if IE were out of the picture, given that that means any
well-formedness violation is an instant fatal error.

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.