Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » $dataobject->Content cutting off with special chars?

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 291 Views
  • nekranox
    Community Member
    31 Posts

    $dataobject->Content cutting off with special chars? Link to this post

    Hey guys,

    I'm looping through a flat data file and pushing the content into new data objects like so:

    $Property = new DetailPropertyPage();
    $Property->Content = htmlspecialchars($dataFileRow[25]);
    $Property->publish('Stage', 'Live');

    The content is consistently cutting off at the same point. When I inspect the data in the flat file, it's cutting off as soon as it hits an un-encoded pound (£) symbol. So I added htmlspecialchars(); as demonstrated above but this hasn't solved the problem. Does anyone know what's going wrong here?



Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.