Closed (fixed)
Project:
Go - url redirects
Version:
7.x-1.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2011 at 16:58 UTC
Updated:
9 Apr 2011 at 18:32 UTC
This is very similar to #10165: Any idea what is the URL to the Events RSS Feed?, but I'm seeing it in Drupal 7. I looked at the patch offered in #10165: Any idea what is the URL to the Events RSS Feed?, but the gotwo.module is pretty different for Drupal 7.
See http://drupal.org/node/101605
My "gotwo" link is:
<go href="http://rickumali.com"><img src="http://www.beginnericehockey.com/sites/default/files/hockey-logo-sm.gif"></go>
I'm willing to take up the fix, but if someone could corroborate this, or tell me what I'm doing wrong, that'd be great. Thank you!
Comments
Comment #1
rickumali commentedMy description was messed up. I meant to write that this is similar to #101605: <img> inside <go> appears to break it.. Thank you!
Comment #2
rickumali commentedI have a fix that seems to work for me, but I'd love a code review of sorts. The diff is:
Basically, when
<go>contains an<img>, the goNode->nodeValue is an empty string (or at least, it acts empty). This is because the nodeValue is not a TEXT_NODE, but rather an ELEMENT_NODE. The proposed fix creates the element 'a' as the linkNode, and then appends the first child into it. Big assumption is that will contain ONE CHILD. The fix could be made more defensive. Please advise on checking in and what not.Comment #3
summit commentedSubscribing, greetings, Martijn
Comment #4
hass commentedMaybe we are able to clone all stuff inside an A tag... I cannot remember why or if I have tested the IMG inside an A tag. We should write a .test to prevent future failures.
Comment #5
hass commentedCommitted a fix (http://drupalcode.org/project/gotwo.git/commit/72b7e1e) that clones all child nodes and not only the first child.
Please give next DEV a try an report back if it works for you. We still need to write tests for this...