Fixed Signature with just whitespace forces signature display

Xon

Well-known member
If someone has a signature with just white space, it is possible to force this to display as a signature (which depending on the theme can look quite silly).

Using the signature:
[S] [/S]

template: message
Code:
  <xen:if is="{$visitor.content_show_signature} && {$message.signature}">
  <div class="baseHtml signature messageText ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
  </xen:if>
Fix (or perhaps a better check on accepting the signature):
Code:
  <xen:if is="{$visitor.content_show_signature} && {$message.signature}">
  <xen:if hascontent="true">
  <div class="baseHtml signature messageText ugc{xen:if $message.isIgnored, ' ignored'}"><aside><xen:contentcheck>{xen:raw $message.signatureHtml}</xen:contentcheck></aside></div>
  </xen:if>
  </xen:if>
 
I believe we have to go with the content check approach. Even ignoring existing signatures like this, some empty tags can still be rendered. It's an option for simple "replace" tags so we could handle those, but it doesn't apply when a callback is defined. Running the BB code through a "simplify" process before saving isn't a bad idea, but it could lead to BC breaks if the keep empty flag was not set on any callback-based BB code that wanted to allow empty tags.

Fixed now anyway, thanks. :)
 
Top Bottom