• 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
    • Problem with new lines

    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: Problem with new lines

    • Issue Tools
      • View Changes
    1. issueid=3621 March 24, 2014 4:07 AM
      DragonSigh DragonSigh is offline
      Junior Member
      Problem with new lines
      New line replaced with "rn"

      After upgrading to VaultWiki v4.0.0 Gamma 4 I faced a problem when line feed is replaced with "rn" chars after saving.
      It brokes multiline bb-code, etc.
    Issue Details
    Issue Number 3621
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.0.0 Gamma 4
    Fixed Version 4.0.0 Gamma 5
    Milestone VaultWiki 4 Gamma X
    Software DependencyvBulletin 4.x w/ ckEditor
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags bb-code, code, line feed, newline, vbulletin 4.2.2




    1. March 28, 2014 12:42 PM
      DragonSigh DragonSigh is offline
      Junior Member
      Any help with this?

      For example if edit the front page of the wiki and add the code:
      Code:
      [table] style="width: 500px"
      |-
      | 
      | 
      |-
      | 
      | 
      |-
      | 
      | 
      [/table]
      After save it become:
      Code:
      [table] style="width: 500px"rn|-rn| rn| rn|-rn| rn| rn|-rn| rn| rn[/table]
      Reply Reply  
    2. March 28, 2014 2:47 PM
      pegasus pegasus is offline
      VaultWiki Team
      If you are using PHP 5.5, then it might be a side effect of this warning, which happens when saving all posts:
      Code:
      Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_wysiwygparser.php on line 310
      vBulletin has special instructions for turning off error reporting when PHP is 5.4 or higher. You may need to do this.

      You should check your error logs for any other error messages when you save posts as well.

      I can confirm this behavior on this site, but I will not be able to debug it until I return from vacation, since our server no longer allows remote dev access.
      Reply Reply  
    3. April 1, 2014 5:27 PM
      pegasus pegasus is offline
      VaultWiki Team
      Yup, unfortunately this is caused by the Warning messages generated by vBulletin's WYSIWYG parser under PHP 5.5. You can complain to them about it. I tested and once all the /e modifier messages are fixed by "using preg_replace_callback instead", the line breaks behave as expected. You can click "Preview" instead of save if you want to see the messages I mean. A more generic explanation, although I can no longer test it since we patched vBulletin here, is that:

      When submitting WYSIWYG mode, line breaks become literal "r" or "n" (no backslash) if the line break occurs inside a BB-Code tag that supports WYSIWYG. You don't really need to prove the behavior, just tell them they are using the /e modifier in includes/class_bbcode.php and includes/class_wysiwygparser.php when that modifier poses security risks, is deprecated, and may no longer work properly in PHP 5.5.
      Reply Reply  
    4. April 4, 2014 11:38 AM
      pegasus pegasus is offline
      VaultWiki Team
      It was unclear in your first post, so I prematurely closed the issue quoting a vBulletin bug. But here is some more information:

      The "rn" issue in most wiki pages is due to the vBulletin bug.
      However, the "rn" issue in the wiki index page is due to a caching issue. See: https://www.vaultwiki.org/issues/3634/
      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 7:27 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.