Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Formatting Text

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 

Tags
&, ampersand, dsf, javascript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:34 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.