• 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 3.x Series
    • Bug
    • Problem with templates and \'

    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 templates and \'

    • Issue Tools
      • View Changes
    1. issueid=735 July 29, 2009 12:56 PM
      vimto vimto is offline
      Regular Member
      Problem with templates and \'

      I'm having a problem posting wiki links in a template that contain a quote mark, if I was to type:

      can't within a wiki tag it would come out at can\'t

      see here: http://www.bluedragons.co.uk/forums/...e=Draniks+Scar and you will see what I mean, I've done some test links at the bottom of the page for you to see.

      Anything I can do to fix this?
    Issue Details
    Issue Number 735
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Editing / Posting Articles
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 2.5.0
    Fixed Version 2.5.1
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. July 29, 2009 4:58 PM
      pegasus pegasus is offline
      VaultWiki Team
      Are the wiki links physically contained in the template, or passed in as parameters? Thanks.
      Reply Reply  
    2. July 29, 2009 5:13 PM
      vimto vimto is offline
      Regular Member
      Passed in as parameters.
      if i type something like:
      |description=[ wiki]can't think of one[ /wiki]
      it will show as:
      can/'t think of one
      and link to can+t+think+of+one

      Any text after the closing template tag are fine, It's just the text within them that it breaks.
      Reply Reply  
    3. July 30, 2009 2:24 PM
      pegasus pegasus is offline
      VaultWiki Team
      Not sure why there is an escape issue here - perhaps it has to do with pregex handling the input and php the output. Anyway, in vault/special_class_template.php, find and delete:
      Code:
      		// get the full text back
      		$text = $this->template_safe_codes('', $text, 1);
      		$text = str_replace('#!#CES-TST()DOL#L', '$', $text);
      Find:
      Code:
      		($hook = vBulletinHook::fetch_hook('vault_templatecode_complete')) ? eval($hook) : false;
      Add before:
      Code:
      		// get the full text back
      		$text = $this->template_safe_codes('', $text, 1);
      		$text = str_replace('#!#CES-TST()DOL#L', '$', $text);
      Find:
      Code:
      				$this->stored_text[] = $search;
      Replace with:
      Code:
      				$this->stored_text[] = str_replace("\\'", "'", $search);
      A similar problem will occur in autolinks. In vault/special_plugins_autolink.php, find:
      Code:
      			$stored_text[] = $search;
      Replace with:
      Code:
      			$stored_text[] = str_replace("\\'", "'", $search);
      Reply Reply  
    4. July 30, 2009 5:52 PM
      vimto vimto is offline
      Regular Member
      I've tried the above changes but the pages are still acting the same.

      there are 3 instances of:
      Code:
      ($hook = vBulletinHook::fetch_hook('vault_templatecode_complete')) ? eval($hook) : false;
      so I tried inserting the code before each of them in turn, uploading, editing and refreshing the page but with the same results.
      Reply Reply  
    5. July 30, 2009 11:39 PM
      pegasus pegasus is offline
      VaultWiki Team
      Oh it should be only before the last occurrence. I was able to duplicate your original problem and these changes do correct the issue. If the article is saved in the post cache, the erroneous version might still be used. You can see an uncached version by adding ?redirect=no or &redirect=no to the URL, for /showwiki/ or showwiki.php URLs respectively.
      Reply Reply  
    6. August 1, 2009 3:37 AM
      vimto vimto is offline
      Regular Member
      I've retried the code changes as mentioned above, cleared the cache and used redirect=no but still getting the problem with wiki links within a template.

      take a look: http://www.bluedragons.co.uk/forums/...ar&redirect=no
      Reply Reply  
    7. August 1, 2009 3:05 PM
      pegasus pegasus is offline
      VaultWiki Team
      For some reason vBulletin stripped the slashes from the code I posted. See the str_replaces again.
      Reply Reply  
    8. August 2, 2009 3:23 AM
      vimto vimto is offline
      Regular Member
      Working great, thanks for looking into this for me.
      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 1:15 AM.
    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 © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.