Jump to content

& conversion


Recommended Posts

Hi ,


I need a little guidance on how to correct my code so to allow a user to use the "&" character as is and not have it returned as "&. Normally this wouldn't be a problem but I think there is a problem with my existing code that I need in the rule.

This is the result that I am getting in the Title line:





Please see below


I am Using


FusionPro™ Designer 6.0P1f

Mac OS 10.5.7

Acrobat 9.x


Text = Field("TitleLine1");

if (Text == "")

return "";



var newArray = new Array( );

var myString = Text;

var mySplitResult = myString.split("");

var str= "&";

str= str.replace(/\&/g,'&');




//bring each cheracter in to array fields

for(i = 0; i < mySplitResult.length; i++){

newArray = (mySplitResult);




for(i = 0; i < mySplitResult.length; i++){

if(newArray == " "){

newArray = ' ';




else if(newArray == newArray.toLowerCase()){

newArray = ('<span pointsize=7>' + newArray.toUpperCase() + '</span>');





var fullText = newArray.join("");


return fullText;



Thanks in advance



Link to comment
Share on other sites

Thanks for the tip in cleaning up my code Dan. I still have the & problem though. It looks good as far as fusion pro previews it but when I upload to site it renders it as "&"


Would you maybe have some other thoughts on this?

If by "upload to site," you mean MarcomCentral, especially if it works correctly in FP Desktop, then please post your query about the MarcomCentral-specific issue to the MarcomCentral forum.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...