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

Hi,

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?



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