cubecart / v6

CubeCart Version 6
https://cubecart.com
71 stars 59 forks source link

SPAN Nesting DIV #3526

Closed bhsmither closed 3 months ago

bhsmither commented 3 months ago

In Foundation element.product.options.php template, lines 24-30, is a <span> chunk of code that wraps at least one <div> block.

A valid structure cannot have block-level elements inside <span>, which can only contain inline elements, even though (currently) there is no apparent display problems.

Suggest:

            <div class="pseudo-label" id="error_option_{$option.option_id}">{$option.option_name}{if $option.required} ({$LANG.common.required}){/if}</div>
            {foreach from=$option.values item=value name=options}
            <div><input type="radio" name="productOptions[{$option.option_id}]" id="rad_option_{$value.assign_id}" value="{$value.assign_id}" class="nomarg{if $value.absolute_price == '1'} absolute{/if}"{if empty($_POST) && !empty($value.option_default)} checked="checked"{/if}{if !$CTRL_HIDE_PRICES} data-price="{$value.decimal_price}"{/if}{if $smarty.foreach.options.first} rel="error_option_{$option.option_id}" {if $option.required}required{/if}{/if} data-image="{$value.image}">
               <label for="rad_option_{$value.assign_id}" class="return">{$value.value_name}{if $value.price} {$value.symbol}{$value.price}{/if}</label>
            </div>
            {/foreach}
abrookbanks commented 3 months ago

Good find thanks.