Jump to content

Ampersand doesn't work when changing to uppercase


dml1280

Recommended Posts

I have already figured out that some fonts won't display the "&" when using "ToUpper". So when I have the issue I use <uppercase></uppercase>.

 

It works when composing the file, but this time it's changing the "&" into the HTML value when used in MarcomCentral.

What should I adjust?

 

Here is my rule:

if (Field("Title Line 1") == "")
   return "";

else return '<uppercase>'+Field("Title Line 1")+'</uppercase>';

 

Here is a link to the screenshot of the output in Marcom

Link to Screenshot

Edited by dml1280
Link to comment
Share on other sites

So first, questions like this which are specific to MarcomCentral should really go in the MarcomCentral sub-forum.

 

Anyway, this is a frequently-asked question. The reason for the ampersand difference is because MarcomCentral generates tagged markup data files, where the ampersand is a control character denoting an entity, while most FusionPro jobs in Creator (Acrobat) use flat-file data, where an ampersand has no special function. Fortunately, FusionPro has a TaggedDataField function designed to handle this properly in both types of data. This rule should do what you want, in both local Creator compositions and in online MarcomCentral compositions:

return '<uppercase>' + TaggedDataField("Title Line 1") + '</uppercase>';

Link to comment
Share on other sites

  • 1 month later...

I too am having the exact same issue (only in WebCRD). But when I check the box for tagged text I get the &amp & if its unchecked I get the entire line of code above (I thought it would work -_-).

 

If I use the preloaded XML rule for all CAPS, it blanks out the '&' completely.

 

I've also tried the below code (from another post)

 

function NoBreak(s)

{

return s.replace(/&/g,'&').replace(/ /g, " ");

}

return NoBreak(TaggedDataField(“Department”));

 

 

Am I going crazy here? Thanks for the look

Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...