Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Pocket add-on HTML is being stripped out

I'm using Vanilla 2.3.1 with Pockets add-on 1.1.2. PHP version if 5.6. I'm switching my forum to a new host. After restoring the backup from the old host to the new host, everything seems to be working correctly except for the Pockets add-on. Somehow, all HTML content from the add-on is being stripped out. Even if I add a plain <div>hello</div> in my add-on, it gets converted to hello. If I add any scripts enclosed in script tag, the script tags are stripped out and I see the content of the script as plain text on the site.

Is there any configuration that I'm missing that could be causing this problem? I've spent a lot of time troubleshooting it but cannot figure out what's happening. I have checked that both old host and new host are using the same PHP version.

Any help or pointers would be appreciated. Thanks.

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    if I add a plain

    hello

    in my add-on, it gets converted to hello.

    That is how it is supposed to work, you don't want to see the html tags, if you do then you need to enclose it as code.

    If I add any scripts enclosed in script tag, the script tags are stripped out and I see the content of the script as plain text on the site.

    post an example of the script or a screen shot of how you are saving that code in the pocket.

  • brainolutionbrainolution ✭✭
    edited October 2017

    I meant to say it gets converted to plain hello when I view the source of the HTML page. The HTML is getting stripped off in the source itself. I'm not expecting to see HTML tags in the rendered HTML page :)

    Another example is of hyperlinks. I'm seeing them as plain text in the both the source as well as the rendered HTML page.

    There's something that's stripping the HTML out of the Pockets code snippets, even before it gets to the source of the page.

  • brainolutionbrainolution ✭✭
    edited October 2017

    Some more details - The HTML is retained and visible in the Pockets settings page. I also looked at the data in the database, and I can see the HTML intact in the database, and it looks exactly the same as on the previous host's database.

    But when the pages are displayed, the HTML is stripped off in the page source and therefore rendered as plain text. The example I gave in the original post is probably not the best. My apologies for that. Here's a more explicit example:

    <a href="www.example.com">Example Link</a> appears in the page source as simply Example Link and rendered as plain text Example Link too.

    Note that the same is working fine and rendered as a hyperlink on my original site (with previous host). I simply took a full backup of the original site and handed it over the new host. They restored the site for me, and I found this problem. All other plugins seem to be working fine so far. So I'm suspecting that some configuration difference between the old host and the new host is causing the problem.

    I have also tried to completely delete one of the pockets and recreate it from scratch, but still got the same result.

    Hope it's more clear now.

  • Issue Resolved!

    I updated the Pockets plugin to v1.2 from Vanilla add-ons page and it's working fine now.

    It still remains a mystery as to why v1.1.2 is working correctly on my old host but not working on the new host.

    Thanks for your help and attention.

Sign In or Register to comment.