Jump to content

Special Characters Copyright, Registered Trademark and Trademark


traba5058

Recommended Posts

Good Morning!

 

I have a javascript rule to replace the above characters & superscript them.

 

var s = Field("Name");
return s.replace(/(™|®|©)/g,'<superscript>$1</superscript>');

 

It is not working. Will you let me know how the marks should be entered in the database?

 

Thanks,

Traba

Link to comment
Share on other sites

Please be more specific than "It is not working."

 

What does your data look like? If it already has the symbols in it, then you can look for those directly:

return Field("Name").replace(/(™|®|©)/g,'<superscript>$1</superscript>');

Though the trademark symbol is usually already superscripted in most fonts, so really just this:

return Field("Name").replace(/(®|©)/g,'<superscript>$1</superscript>');

If it's a job that will be run in MarcomCentral or a similar system, where it may use flat-file (delimited) text data for local compositions but tagged markup data for online compositions, you can do this:

return TaggedDataField("Name").replace(/(®|©)/g,'<superscript>$1</superscript>');

Make sure to check the "Treat returned strings as tagged text" box.

Link to comment
Share on other sites

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...