View Single Post
Old September 29th, 2015, 12:57 PM
thomas.cronqvist thomas.cronqvist is offline
Forum n00b
Join Date: Sep 2015
Posts: 6
Default Nobreak function and Ampersand problem


I have a problem with a piece of code on a business card in DSF/FP9.3. We need to keep a string on one line without wrapping and use the function below. Works fine unless there is a "&" in the input field.

"Me And You" works fine but "Me & You" composes to "Me & You"

Anyone know how to overcome?

function NoBreak(s)
  return NormalizeEntities(s).replace(/ /g, " ");
return NoBreak(Field("title"));
Reply With Quote