Pligg Support

I'm pulling a lot of feeds from Facebook and sometimes wind up with html entities in the titles which doesn't render properly on display. I know about 'html_entity_decode' but haven't figured out where to put it and the variables involved.

Possible Answers

    Thanks Redwine!!

    This is what I added to:

    rss_importtemplatesimport_fields_center.tpl LINE # 30

    if($link->pligg_field == 'link_title'){$MyArray['title'] = html_entity_decode($link->feed_field,ENT_QUOTES,"ISO-8859-1");}

    I then deleted two offending posts and did a 'override' import of the feed which loaded fine but didn't do one bit of good.

    So I either have a syntactical error or else my flags are set wrong.

    Here's three titles that were imported after the change:

    Chris Wilson's Bronco at the Baja 500 this weekend.

    Two guys...two new rides! Trent Montgomery in Bounty Hunter and Nate "Opie" Kirc

    VW Kübelwagen Type 82

    | Posted 613 days ago | Permalink | Hide Replies

    I didn't have the module installed, I just downloaded it to check the code. After your reply, I installed it and tried to get to work with it, but I really did not know how to display the rss after the import and could not test the decoding live. Anyway, I believe that you should use "UTF-8" instead of ISO.

    Got to and paste the code to test it and see the difference::

    $link_title = "VW Kübelwagen Type 82";

    echo html_entity_decode ($link_title, ENT_QUOTES, "ISO-8859-1");

    echo html_entity_decode ($link_title, ENT_QUOTES, "UTF-8") ";

    | Posted 612 days ago | Permalink | Hide Replies

    It works with either setting on the php test site but doesn't work in the code itself. I'm thinking it's my syntax!!! I wanted UTF-8 but read somewhere that was the default and didn't work properly.

    | Posted 612 days ago | Permalink | Hide Replies

    I reinstalled it and tested it. it is not working well for me, and last night after I un-installed, it messed up my tags on the home page; they disappeared. When I reinstalled it now, they showed up. Weird!!!

    The way I figured, is that the rss imported feed will appear the same way a link appears in the summary. Am I right? if so, then this will fix the title:

    Open libs\link.php

    Within the function read($usecache = TRUE) {

    and in the if($link) {

    look for:


    and right below it, add

    $this->title=html_entity_decode ($this->title, ENT_QUOTES, "UTF-8");

    Do not html entity decode:



    it will break the link and you get 404

    It worked for me.

    | Posted 612 days ago | Permalink | Hide Replies

    Thanks, Redwine, that's 'Quick and Dirty' but it works fine. I'll note that in the proper places in my code.

    I probably should revisit doing it in the RSS module down the road as I'd rather not have the html entities present in the database since submit doesn't seem to allow that but RSS does.

    But it works and you can't argue with success!!!

    BTW: I'm running 1.2.2 instead of 2.0.x (except for one site) which may account for the weirdness with the tags but I've never removed the RSS module either. RSS is the key to what I'm doing.

    | Posted 612 days ago | Permalink | Hide Replies

    I am glad it worked! :-)

    I will, eventually give the RSS Importer a shot. I like to fix things!

    | Posted 612 days ago | Permalink | Hide Replies

    I guess you are using the rss import module. The link_title appears in:


    LINE # 30 ..... if($link->pligg_field == 'link_title '){$MyArray['title'] = $link->feed_field;}

    you can html entity decode it there.

    | Posted 613 days ago | Permalink | Hide Replies

Who Upvoted this Story's Support area is where you can ask questions and get answers. Just getting started with the Support area? This section describes tips for participating.

Submitting a Question or Comment

By taking a minute to research previous posts you may receive an answer much faster than waiting for a response to a new question. Begin by searching the support section for an answer. Sometimes you may even want to extend your search to the entire domain.

If you are unable to find a relevant answer, submit a new question or comment here. Please provide a detailed description and, when necessary, debugging information such as your server environment (a link to a <?php phypinfo(); ?> .php page would be very helpful), your web browser, and any steps necessary to reproduce your issue.

Submitting an Answer

If you have an answer or useful response that you would like to add to a post, you can submit it as a comment which other users will then vote on. Answers are sorted by most popular to least, allowing the best information to climb to the top of the page.

Please read and vote for existing answers before submitting your own, as there may already be an acceptable answer provided. You can use the "Reply" link found within an answer to submit a response to it, in case you want to expand or comment on someone else's contribution.

Including Files or Code

Sometimes it is necessary for you to attach a file or include a snippet of code for others to reference in your response. In most cases, you can .zip up files and attach them to a question or answer using Pligg's file manager. At times though this may fail, and in these circumstances we recommend using a third party host. Below we are including a list of recommended websites where you can share easily share file uploads (or snippets of code) through the web.