• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • [4.1 Beta 3] Template bbcode wrapped by table bbcode can result in partial data loss

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: [4.1 Beta 3] Template bbcode wrapped by table bbcode can result in partial data loss

    • Issue Tools
      • View Changes
    1. issueid=5858 September 14, 2019 9:38 AM
      ACL ACL is offline
      Regular Member
      [4.1 Beta 3] Template bbcode wrapped by table bbcode can result in partial data loss

      On the VW.org XF demo site, I've created a template and embedded that into another page. This template is intended to add CSS styling to a containing DIV or TABLE bbcode cell.

      Here's what happens when the template is embedded within a (non-template) wiki page....

      The original contents as typed in the editor:
      Code:
      [TABLE]|-
      | [template]Template:BlockStylingTest|block=yes|msg=table test[/template]
      [/TABLE]
      When opening the page for re-editing, the initial edit mode is with the Froala editor. Toggling the BBcode editor produces the following:
      Code:
      [TABLE]|-
      | block=yes|msg=table test[/template]
      [/TABLE]
    Issue Details
    Issue Number 5858
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Templates
    Status Fixed
    Priority 1 - Security / Login / Data Loss
    Affected Version 4.1.0 Beta 3
    Fixed Version 4.1.0 Beta 3
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 1
    Assigned Users (none)
    Tags (none)




    1. September 14, 2019 10:13 AM
      ACL ACL is offline
      Regular Member
      For this issue, I thought it would be worth showing a use case where it makes sense for a template to start with styling info. I use this on my XF1.5-based site as an easy way to have a stylised yes/no table cell:

      Attachment 1695

      Wiki editors on my site can then just embed this template and not have to worry about manually creating the inline CSS for each table cell.
      Reply Reply  
    2. September 16, 2019 12:18 PM
      pegasus pegasus is offline
      VaultWiki Team
      Improved in the next build. Tags that include that attribute closing character | will no longer be mistaken as part of the table's attributes in RTE/WYSIWYG mode, unless the closing character appears after the tag.

      Note that all variations cannot be fixed entirely:
      - Tags that are used as part of the attributes portion of a table should now be preserved when switching editor modes; however, tags that are used within a named attribute cannot be preserved since the attribute will fail validation.
      - Tags that are used directly in the attributes portion of a table cannot be edited while in RTE/WYSIWYG modes since attributes are not visible in those modes.

      As before, if the intention is not to use a tag in the attributes, make sure that there is no closing | after the tag, or ensure you put the closing | before the tag.

      However, for your specific use case, it is probably more beneficial to create dedicated CSS classes for use in such tables, as this will be more efficient, generate less output, and possibly be less code to remember than specific template invokes. Classes can be whitelisted in the wiki-related options for the TABLE BB-Code.
      Reply Reply  
    3. September 16, 2019 12:55 PM
      ACL ACL is offline
      Regular Member
      Thank you!

      Quote Originally Posted by pegasus
      Tags that are used as part of the attributes portion of a table should now be preserved when switching editor modes; however, tags that are used within a named attribute cannot be preserved since the attribute will fail validation.
      If I understand correctly, the following is what you mean?
      Data preserved: [div][template]name|var=1[/template]|text[/div]
      Data not preserved: [div]class="[template]name[/template]"|text[/div]

      Quote Originally Posted by pegasus
      However, for your specific use case, it is probably more beneficial to create dedicated CSS classes for use in such tables, as this will be more efficient, generate less output, and possibly be less code to remember than specific template invokes. Classes can be whitelisted in the wiki-related options for the TABLE BB-Code.
      This is a good idea. I do have a pair of yes/no classes, but for the purposes of reproducing on VW.org I simplified this to inline CSS. The yes/no classes set background color, font color and text alignment. Currently a check/times font-awesome icon is inserted by the HTML-parsing template with <i></i> ... but I may convert this to the CSS approach, i.e. .wiki-yes:before { content: "\f00c" }. An optional message (with a {{{msg}}} template variable) follows after the fa icon.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 4:09 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.