Feature #6637
closedAdd HTML5 support to CGI
Description
=begin
The attached patch adds support for HTML 5, providing
the doctype 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/test_cgi_core.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
Files
Updated by mame (Yusuke Endoh) over 12 years ago
- Status changed from Open to Assigned
- Assignee set to xibbar (Takeyuki FUJIOKA)
Updated by stomar (Marcus Stollsteimer) over 12 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 existingCGI#header
(which returns the HTTP header) -
suggestion:
renameCGI#header
, possibly toCGI#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)
Updated by mame (Yusuke Endoh) over 12 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
Updated by xibbar (Takeyuki FUJIOKA) over 12 years ago
I think your proposal is good.
I will insert your patch to my branch and test.
Please wait so days.
Thank you.
Updated by mame (Yusuke Endoh) over 12 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
Updated by stomar (Marcus Stollsteimer) over 12 years 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
toCGI#http_header
(breaking downward compatibility) -
second patch to provide full HTML5 support at once
Regards,
Marcus
=end
Updated by xibbar (Takeyuki FUJIOKA) about 12 years ago
- Category set to lib
- Target version set to 2.0.0
Sorry, I was into other cgi performance tuning.
I will commit immediately.
Updated by xibbar (Takeyuki FUJIOKA) about 12 years 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]
- lib/cgi/core.rb: ditto.
Updated by stomar (Marcus Stollsteimer) about 12 years 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
Updated by xibbar (Takeyuki FUJIOKA) about 12 years 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.
Updated by stomar (Marcus Stollsteimer) about 12 years ago
=begin
Since this issue is already closed, I opened a new one, see #7110.
=end
Updated by ko1 (Koichi Sasada) about 12 years ago
- Status changed from Feedback to Closed
It seems closed.