Jump to:

3433 Posts in 1058 Topics by 734 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: 282 Views
  • nekranox
    Avatar
    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->writeToStage('Stage');
    $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?

    Thanks,

    Robbie

    282 Views
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.