Keyword

Double quotes removed from extra fields

  • Steve Tustin
  • Steve Tustin's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 8 months ago #93058 by Steve Tustin
Double quotes removed from extra fields was created by Steve Tustin
Using K2 2.4.1

 

When adding content to extra fields, if the item has double quotes " in it, the content is removed. For instance,

 

Length: 25cm (10")

 

Produces

 

Length: 25cm(10

note the missing quote and closing bracket.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #93059 by Luke Steadman
Replied by Luke Steadman on topic Double quotes removed from extra fields
I had the same problems Pete, my fix can be found at www.steadweb.co.uk/joomla/k2-extra-fields-handling-special-characters

 

The reason why you are missing the double quotes and bracket is because K2 uses JSON (a form of regular data handling) and to split each field up, it uses double quotes, so in your field, the JSON parser thinks the end of the field is after the 10, when really it should be handled to change each HTML entity into its raw form. That's what my fix does. Let me know if you need any help.

Please Log in or Create an account to join the conversation.

  • Steve Tustin
  • Steve Tustin's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 6 months ago #93060 by Steve Tustin
Replied by Steve Tustin on topic Double quotes removed from extra fields
Thanks Luke. Makes sense. Need to get this incorporated into K2.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum