Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Problem with ampersand in $many_many_extraFields


Go to End


3 Posts   1634 Views

Avatar
Chazz

Community Member, 7 Posts

10 May 2015 at 11:52pm

Edited: 10/05/2015 11:53pm

Hello there,

if I use text fields in $many_many_extraFields and save a text with a &, the text gets cut off after the & (including the &). This happens with HTMLText, Text and Varchar fields. If I enter "a&b" it shows just "a" after saving in the form field. In the database the complete "a&b" is visible. But of course after just saving again it is also "a" in the database. For the HTMLText it also happens with automatically inserted " ". I'm using 3.1.12 and setting the fields for the $many_many_extraFields just like in docs.

Anyone else having similiar problems? Is it a bug?

Thanks in advance

Avatar
Pyromanik

Community Member, 419 Posts

11 May 2015 at 11:03pm

It sounds like an issue with the escaping of the output. I would recommend opening an issue on github.

Avatar
Chazz

Community Member, 7 Posts

15 May 2015 at 2:44am

Thanks, will do that.
I found some others strange behaviour with HTMLText in $many_many_extraFields: If it's outputted in the template with FirstParagraph after around every 60 characters a <br> is inserted.