Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8110571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:48:03+00:00 2026-06-06T01:48:03+00:00

Here is a section of code used by CKEditor on my website: CKEDITOR.config.IPS_BBCODE =

  • 0

Here is a section of code used by CKEditor on my website:

CKEDITOR.config.IPS_BBCODE          = {"acronym":{"id":"8","title":"Acronym","desc":"Allows you to make an acronym that will display a description when moused over","tag":"acronym","useoption":"1","example":"[acronym='Laugh Out Loud']lol[/acronym]", ...

If you scroll to the right just a little, you will see this:

"[acronym='Laugh Out Loud']lol[/acronym]"

I need to store all of the CKEditor code inside a javascript string, but I can’t figure out how to do it because the string has both ” and ‘ in it. See the problem? Furthermore, I don’t think I can just escape the quotes because I tried doing that and the editor didn’t work.

Any idea what I can do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:48:05+00:00Added an answer on June 6, 2026 at 1:48 am

    You might try taking the string and injecting JavaScript escape codes into it. JavaScript can essentially use any unicode value when using the format: \u#### – so, for a ' character, the code is \u0039, and for the " character, the code is \u0034.

    So – you could encode your example portion of the string as:

    \u0034[acronym=\u0039Laugh Out Loud\u0039]lol[/acronym]\u0034
    

    Alternatively, you could attempt to simply escape the quotes as in:

    \"[acronym=\'Laugh Out Loud\']lol[/acronym]\"
    

    The problem here occurs when you wind up with this kind of situation:

    "data:{'prop1':'<a href="/url/here/">back\\slash</a>'}"
    

    Which, when escaped in this manner, becomes:

    "data:{\'prop\':\'<a href=\"/url/here/\">back\\\\slash</a>\'}\"
    

    While this is somewhat more readable than the first version – de-serializing it can be a little tricky when going across object-spaces, such as a javascript object being passed to a C# parser which needs to deserialize into objects, then re-serialize and come back down. Both languages use \ as their escape character, and it is possible to get funky scenarios which are brain-teasers to solve.

    The advantage of the \u#### method is that only JavaScript generally uses it in a typical stack – so it is pretty easy to understand what part should be unescaped by what application piece.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a section of code that is being used to determine if a
Has anyone here created a Flash site or application that is ADA (Section 508)
I'm creating a gallery section for my app which will be used to show
I have a section of code that I would not like to run if
I'm not sure what's going on here but here's a section I'm having problems
In the section titled 'Memory Warnings' here http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmNibObjects.html , I don't follow why the
Play with it here: http://jsbin.com/ocicu4/4/edit Simple Accordion, I only want one section open at
Here's the deal: I'm in the process of planning a mid-sized business application that
I have an ASP.NET site that I am maintaining. Currently it has code that
The lock statement ensures that one thread does not enter a critical section of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.