Hi I'm new to SilverStripe and I haven't kept my coding up to date so I'm pretty damn rusty. Anyhow. I want to show an embedded video from youtube on my home page. Having looked through the first two tutorials I figured I could add a new HTMLVarchar DBField to my HomePage and then simply copy paste the embed snippet from youtube.
That didn't work. Firefox says: XML Parsing Error: not well-formed and Safari says something about an EntityRef. As most of you already know this is due to the & in the embed code. And replacing & with & solves the problem.
However, manually replacing & with & isn't an option. So I thought maybe I could use PHP and simply replace & with & but after digging around for a while I learnt that you can't pass variables to the controller functions. So now I'm stuck. And would appreciate any help on where to begin. Can I get to the data before it is loaded into the DataObjects and place the PHP function there or what would be the correct way of doing this seemingly simple operation.
Best
.rickard
PS. By the looks of it silverstripe seems like a CMS I will use a lot if I get back into developing.