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

Thanks for your replies.. @Dan, your suggestion has exactly the same result - the "&" input composes to &

function NoBreak(s)
  return s.replace(/ /g, " ").replace(/ /g, " ");
return NoBreak(TaggedDataField("title"));
Both my original function and yours work well in Creator.

@tobarstep - I have checked the "Treat returned strings as tagged text" checkbox. If not checked, all no break spaces would show as   when composing.

I suspect this has to do with how DSF is handing over the text input to FP Server. Would it maybe be possible to convert the entity "&" to a plain text "&" in the script before trying to perform the NoBreak function?
Reply With Quote