Closed (fixed)
Project:
HTML5 Tools
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Jun 2011 at 14:47 UTC
Updated:
4 Jan 2014 at 00:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
steven jones commentedTo clarify further, this only occurs if you parse a HTML5 fragment outside of the document's DOM, e.g.:
Comment #2
steven jones commentedSo we (now) have some code that replaces the insert method with a version that supports HTML5 in IE 6/7/8:
I really don't have time for a patch, but here's what we're doing.
Comment #3
ericduran commentedHmm, Make sense,
Maybe we should also include the innershiv js.
I think now that there's a html5 d8 initiative we should pretty much back-port everything to this module.
Also this might be a good d8 issue.
Comment #4
stevetweeddale commentedI might try and make a patch for html5 base to do this for d7. Or should this code live in html5tools? Not totally clear where the between them is on this.
And depending on the outcome of #1077878: Add HTML5shiv to core there may need to be a d8 core issue for it as well.
Comment #5
jide commentedSince we use JQuery in Drupal, we could safely remove the second parameter and return childNodes directly.
The WTFPL license is problematic, we should see if the author is likely to change the license if we use this technique.
A jQuery method that behaves like load() is also mentioned : https://gist.github.com/735829.
Comment #6
stevetweeddale commentedYou've gotta enjoy the irony if there are indeed licensing issues. Does the WTFPL not mean we can just include it without attribution and under whatever license modules fall under?
"If you do not like the license terms, just relicense [sic] the work under another license." ...taken from the wtfpl license page
Comment #7
ericduran commentedWe could use that plugin. We'll just need to remove the license
Comment #8
ericduran commentedAlso tools seems more appropriate that base.
Comment #9
jide commentedHehe, did not take the time to check the WTFPL license terms :)
Comment #10
seutje commentedThere seems to be a more advanced version of the innerShiv, which also strips script tags, fixes tables, handles XHTML properly and stuff...
the newer version also bails early on when it detects the browser to be able to render HTML5 elements created outside of the active DOM.
Attached patch assumes patch #82 in #1077878: Add HTML5shiv to core went in
Comment #11
seutje commentedjust found out we are using prefixed patches nowadays, my apologies
Comment #12
inolen commentedseutje: If you add the monkey patch into html5.js, you need to ensure that html5.js it loaded after ajax.js:
Comment #13
ericduran commentedWe shouldn't be patching the html5.js file being that this is for d7, we should include our own html5.js in tools instead.
Mind you tools is for 6 and 7. Not so much for 8 ;)
Comment #14
ericduran commentedComment #15
seutje commentedoh, my bad
Comment #16
bleen commenteddont forget if we cinlude our own html5.js we will likely need to make sure the core version isnt also loaded.
Comment #17
ericduran commentedWe don't really need to include a html5_tools specific js.
The scripts each have their own names they should stay that way.
We just need to provide the hook_libraries for the scripts.
Also if the html5.js makes it into core it'll be sometime before it gets in 7. Also I doubt there actually be a specific file name html5.js I think thats bad naming and we shouldn't name it that neither ;)
Comment #18
inolen commentedSo, instead of monkey patching, I patched my local ajax.js to have the same fix by adding:
at the very top of Drupal.ajax.prototype.commands.insert, however, when using innerShiv this broke the AJAX framework when it attempts to insert scripts, because innerShiv strips out
tags. For now I've modified innerShiv to simply not strip them out (source available at https://github.com/jdbartlett/innershiv), but I'm sure it strips them out/doesn't process them for a good reason, so I doubt this is a good solution.Comment #19
ericduran commentedThis is possible without hacking core.
Comment #20
seutje commented@inolen: https://github.com/jdbartlett/innershiv/issues/4#issuecomment-1051825
Comment #21
ericduran commentedOk, so the shiv is in this module for 7.x now we need to do the innershiv. I'm not totally sure on this one.
Any recommendations?
Comment #22
ericduran commentedOk, this is now fixed. I just monkey patch it as @seutje did.
So now the shiv and the innershiv are easily accesible in this module.
Thanks all.