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

Not a Bug [IMG] content being visually rendered when inside [CODE=rich] tag

Discussion in 'Resolved Bug Reports' started by CyclingTribe, Sep 7, 2013.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    I came across this one whilst helping a member with their mileage signature ticker on CycleChat.

    When using [ IMG ] tags inside of [ CODE=rich ] container the image is visually rendered instead of the text being shown.

    See this thread for an examples: http://xenforo.com/community/threads/code-rich-test.59198/

    Some test text:


    Hopefully this will render plain but here's some test content to replicate it:

    Regular [ code] tag:
    [code]
    [IMG]http://veloviewer.com/SigImage.php?a=1348e4&r=2&c=4&u=I&g=n&f=jilnozzzzz&z=a.png[/IMG]
    [/code]

    Rich [ code] tag:
    [code=rich]
    [IMG]http://veloviewer.com/SigImage.php?a=1348e4&r=2&c=4&u=I&g=n&f=jilnozzzzz&z=a.png[/IMG]
    [/code]


    ... and here's how it looks:

    Regular [ code] tag:
    Code:
    [IMG]http://veloviewer.com/SigImage.php?a=1348e4&r=2&c=4&u=I&g=n&f=jilnozzzzz&z=a.png[/IMG]
    
    Rich [ code] tag:
    Code:
    [​IMG]
    
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    I wouldn't exactly classify this as a bug, since the styling and JavaScript constrain it to the containing element. You can still expand it. But Mike & Kier will decide.
     
  3. CyclingTribe

    CyclingTribe Well-Known Member

    It's not really about containment, but about rendering. Surely any text inside a [ CODE ] wrapper should strictly display as text?
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    If you specify rich, it renders BBCode. Which is expected to render an IMG tag.
     
  5. CyclingTribe

    CyclingTribe Well-Known Member

    I understood rich as applying text formatting, such as bold, colour, etc. not rendering the content of the pasted code.

    I'd specifically used =rich to highlight the BBCode error to my member when they'd added their ticker code - putting the [ IMG ] tag in bold and expecting the resulting text to be in bold in the code view.

    I'm pretty sure that's how the previous editor worked - so perhaps it's an old habit from the old editor that I just need to get out of? :)
     
  6. CyclingTribe

    CyclingTribe Well-Known Member

    Hmmm ... okay, having tested this on an XF 1.x site it does the same thing so perhaps this is a perception thing (mine) and I should be using something else instead??!! ;)

    In which case, how would I render the text of [ IMG ] BBCode with some textual formatting to highlight parts of the code? (Perhaps is just isn't possible, given the combination of displaying the BBCode as text as well as using it for formatting [my head is beginning to hurt trying to work it out ... :confused:]).
     
  7. Jeremy

    Jeremy XenForo Moderator Staff Member

    Use the plain tag:
    Code:
    [IMG]Or disrupt the tag.[/IMG]
     
  8. CyclingTribe

    CyclingTribe Well-Known Member


    [IMG]http://veloviewer.com/SigImage.php?a=1348e4&r=2&c=4&u=I&g=n&f=jilnozzzzz&z=a.png[/IMG]


    Unfortunately it doesn't allow text to be formatted - any formatting is removed on post.

    This is a screenshot of what I'm trying to achieve and it just seems impossible:

    upload_2013-9-7_2-11-15.png
     
    Last edited: Sep 7, 2013
  9. Jeremy

    Jeremy XenForo Moderator Staff Member

    If you quote my post, you'll see all I did was break up the [IMG] tag to force no parsing.
     
    CyclingTribe likes this.
  10. CyclingTribe

    CyclingTribe Well-Known Member

    So, using PLAIN to break the code (and render it, well, renderless ... lol) you can then format the before and after parts and they seamlessly join when posted?
    Code:
    [IMG]http://veloviewer.com/SigImage.php?a=1348e4&r=2&c=4&u=I&g=n&f=jilnozzzzz&z=a.png[/IMG]
    Genius - thanks @Jeremy :D
     

Share This Page