ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Magpie, PHP, and curly braces, oh my!

July 19, 2009 12:58am

Subscribe [1]
  • #1 / Jul 19, 2009 12:58am

    Todd Levy

    20 posts

    This question may be related to a resolved thread.

    Hey all.

    I’m having a similar problem to the the one I was having here and considering how helpful everyone was last time I’m hoping for another EEForum success story!


    Here’s the basics..

    As before, I’m calling magpie in a template that parses php on output.

    Everything is working great… UNLESS… an item in the feed has a curly brace in it.

    Then it breaks.

    I’m using a custom function to parse the feed data before trying to use it (ie. the solve from the previous problem).

    Figured I could just add the curly brace to the list of replaced characters but no luck.

    Here’s the code…

    class Xml_encode_tl {
      var $return_data;    
      function Xml_encode_tl($str = '')
      {
      global $TMPL;
      $this->return_data = '';
      if ($str == '')
      {
        $str = $TMPL->tagdata;
        $this->return_data = trim(str_replace('$', '$', $str));
        $this->return_data = trim(str_replace('{', '{', $str));
        $this->return_data = trim(str_replace('}', '}', $str));
      }
    }

    ... but it’s not working.


    Here’s the page in question… http://phishtwit.com

    NOTE: I suppressed the feed from including the person who’s been using curly braces so it should appear to be working correctly.

    Any help GREATLY appreciated.

    TL

  • #2 / Jul 19, 2009 7:53pm

    Greg Aker

    6022 posts

    Greetings! 

    What errors are you receiving?  What version/build of ExpressionEngine are you running?  Can you give us an example of what input that breaks the feed is?  Also, what do you have your debugging preference set to?

    -greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases