Fixed Wrapper display HTML for custom fields contains tabs in {$value} property

Kruzya

Well-known member
Affected version
2.2.11
As said in title, when we use {$value} in Wrapper display HTML, it may contains tabs when output.
Simple example:
HTML:
<a href="https://t.me/{$value}" target="_blank">Open chat in Telegram</a>
&nbsp;
<a data-xf-init="copy-to-clipboard tooltip"
   class="is-hidden"
   title="Copy"
   data-copy-text="{$value}">
    <i class="far fa-clone" aria-hidden="true"></i>
</a>

Produces the next HTML (copied from browser after handling by JS-code):
HTML:
<a href="https://t.me/
    
        
            crazyhackgut
        
    
" target="_blank">Open chat in Telegram</a>
&nbsp;
<a data-xf-init="copy-to-clipboard tooltip" class="" data-copy-text="
    
        
            crazyhackgut
        
    
" data-original-title="Copy" aria-label="Copy" id="js-XFUniqueId6">
    <i class="far fa-clone" aria-hidden="true"></i>
</a>

This may be caused because result of calling macro custom_fields_macros::custom_field_value in custom_fields_macros::custom_fields_values isn't trimmed.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.13).

Change log:
Ensure wrapper display HTML value has whitespace trimmed
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom