Feature #6637

Add HTML5 support to CGI

Added by Marcus Stollsteimer almost 2 years ago. Updated over 1 year ago.

[ruby-core:45812]
Status:Closed
Priority:Normal
Assignee:Takeyuki FUJIOKA
Category:lib
Target version:2.0.0

Description

=begin
The attached patch adds support for HTML 5, providing
the doctype <!DOCTYPE html> and the tag helpers for the
new HTML elements (article, section, ...).

Changes were made in
* lib/cgi/core.rb'
*
lib/cgi/html.rb'

Tests were added to
* `test/cgi/testcgicore.rb'

((Notice:)) the new HTML5 `header' element has ((not)) been added,
because it collides with the already defined CGI#header
method that creates the HTTP header block.
To avoid unreflected addition of this element, a test has
been included to make sure that CGI#header won't break.

Detailed list of changes in `html.rb' (in comparison to HTML 4 strict):

  • doctype changed
  • new elements added
  • removed elements: tt, big, acronym
  • void elements: area, base, br, col, command, embed, hr, img, input, keygen, link, meta, param, source, track, wbr
  • new elements with optional end tag: optgroup, rt, rp

See the Editor's Draft of the HTML5 specification (15 June 2012):
((URL:http://dev.w3.org/html5/spec/)).
=end

html5_support_lib_cgi.patch Magnifier (3.46 KB) Marcus Stollsteimer, 06/24/2012 06:53 AM

6637.pdf (64.8 KB) Marcus Stollsteimer, 07/02/2012 01:54 AM


Related issues

Related to ruby-trunk - Bug #7110: CGI: Add support for HTML5 <header> tag Closed 10/05/2012

Associated revisions

Revision 37077
Added by Takeyuki FUJIOKA over 1 year ago

  • lib/cgi/html5.rb: Add html5 tag maker.
    • lib/cgi/core.rb: ditto. [Feature #6637]

History

#1 Updated by Yusuke Endoh almost 2 years ago

  • Status changed from Open to Assigned
  • Assignee set to Takeyuki FUJIOKA

#2 Updated by Marcus Stollsteimer almost 2 years ago

Slide added (attached 6637.pdf).

Content:

Feature #6637: Add HTML5 support to CGI, now!

Motivation

  • CGI: provides methods for generating HTML elements

  • HTML5 already widely used, support highly desirable

Contra

  • new element <header> collides with existing CGI#header
    (which returns the HTTP header)

  • suggestion:
    rename CGI#header, possibly to CGI#http_header

Proposal

  • at least, include support for nearly all new HTML5 elements
    (easy to achieve, no compatibility issues, patch supplied)

  • if possible, achieve full support
    (this could not be done in a minor release)

#3 Updated by Yusuke Endoh almost 2 years ago

Received, thank you!

Unfortunately, CGI maintainer (Takeyuki Fujioka) is not planning to attend the developers' meeting.
So it may be difficult to determine to accept your proposal. But we'll discuss it. Thank you again!

Yusuke Endoh mame@tsg.ne.jp

#4 Updated by Takeyuki FUJIOKA almost 2 years ago

I think your proposal is good.
I will insert your patch to my branch and test.
Please wait so days.
Thank you.

#5 Updated by Yusuke Endoh almost 2 years ago

Marcus Stollsteimer,

We discussed your slide at the developer meeting (7/21), and
left this issue up to the CGI maintainer (Takeyuki Fujioka).

Yusuke Endoh mame@tsg.ne.jp

#6 Updated by Marcus Stollsteimer over 1 year ago

=begin
Hi Takeyuki,

have you come to any conclusions?

In case you consider support of all new HTML5 tags,
including , I would be willing to provide
a new set of patches:

  • first patch to rename CGI#header to CGI#http_header
    (breaking downward compatibility)

  • second patch to provide full HTML5 support at once

Regards,
Marcus
=end

#7 Updated by Takeyuki FUJIOKA over 1 year ago

  • Category set to lib
  • Target version set to 2.0.0

Sorry, I was into other cgi performance tuning.

I will commit immediately.

#8 Updated by Takeyuki FUJIOKA over 1 year ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r37077.
Marcus, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/cgi/html5.rb: Add html5 tag maker.
    • lib/cgi/core.rb: ditto. [Feature #6637]

#9 Updated by Marcus Stollsteimer over 1 year ago

=begin
Hi Takeyuki,

Did you consider the issue with the tag?
At the moment it can not be created with the tag writer
like the other tags. I proposed a possible solution
in my previous posts.

Do you have any thoughts about this point?

Regards,
Marcus

BTW. I would have appreciated being mentioned in
the log message, like it's done by other committers
("patch by ..."), considerung the effort I put into this.
=end

#10 Updated by Takeyuki FUJIOKA over 1 year ago

  • Status changed from Closed to Feedback

I need your full support patch to support the complete HTML5.
I will write "patch by stomar" to log, I promise.
Please provide.

#11 Updated by Marcus Stollsteimer over 1 year ago

=begin
Since this issue is already closed, I opened a new one, see #7110.
=end

#12 Updated by Koichi Sasada over 1 year ago

  • Status changed from Feedback to Closed

It seems closed.

Also available in: Atom PDF