CMS MADE SIMPLE FORGE

CGSmartImage

 

[#9790] {cgsi_convert} tags incorrectly convert empty elements

avatar
Created By: Stephan (10010110)
Date Submitted: Wed Jan 22 09:39:30 -0500 2014

Assigned To: Robert Campbell (calguy1000)
Version: 1.10.10
CMSMS Version: None
Severity: Major
Resolution: Won't Fix
State: Closed
Summary:
{cgsi_convert} tags incorrectly convert empty elements
Detailed Description:
When {cgsi_convert} is used around content that contains empty elements they are
always closed XHTML style (removing the closing tag and closing element with
slash) even if it’s uncommon to do so, e. g. with divs which usually have a
closing tag, which screws up the layout (at least in Firefox).

In my specific case I had Facebook related divs (like <div id="fb_root"></div>)
which are used as hooks to attach the script functionality and with cgsi_convert
they were converted to <div id="fb_root" /> which shouldn’t happen.


History

Comments
avatar
Date: 2015-01-16 16:39
Posted By: Robert Campbell (calguy1000)

fixed it, thanks.
      
avatar
Date: 2015-02-26 11:44
Posted By: Robert Campbell (calguy1000)

actually, I'm changing this to won't fix.
the 'fix' I applied to make sure that every element had a closing tag also did
the same thing with <img/> and <br/> elements.  which caused significant
rendering issues on different browsers (two newlines etc).

Self closing tags are legal XHTML for every element:
http://stackoverflow.com/questions/97522/what-are-all-the-valid-self-closing-elements-in-xhtml-as-implemented-by-the-maj

So I'm reverting my change wrt this.
      
Updates

Updated: 2015-05-05 21:50
state: Open => Closed

Updated: 2015-02-26 11:44
resolution_id: 7 => 8

Updated: 2015-01-16 16:39
resolution_id: => 7
cmsms_version_id: 30122 => -1