1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

As Designed Spoiler content when there is no View

Discussion in 'Resolved Bug Reports' started by Lawrence, Feb 11, 2014.

  1. Lawrence

    Lawrence Well-Known Member

    When there is no View, and $rendererStates is empty, $content is not appended within the returned HTML.
     
  2. Mike

    Mike XenForo Developer Staff Member

    This is intentional as we don't want to leak the content unexpectedly (in a place that might not be able to hide it). You can see that in the code:
    Code:
            if (!empty($rendererStates['spoilerTextWithFallback']))
            {
                return '<div>' . $content . '</div>';
            }
            else
            {
                $spoilerText = new XenForo_Phrase('spoiler');
                return '<div><b>' . ($title ? ($spoilerText . ': ' . $title) : $spoilerText) . '</b></div>';
            }
     
  3. Lawrence

    Lawrence Well-Known Member

    Makes sense, thanks Mike.
     

Share This Page