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 867241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:56:29+00:00 2026-05-15T09:56:29+00:00

How do you nest quotes in HTML beyond the second level? As far as

  • 0

How do you nest quotes in HTML beyond the second level? As far as I know, there are only 2 types of quotes – single(‘) and double(“). I am aware of escaping using slashes – you have to escape in the code but that escaping won’t work at the browser level. What is the accepted method to get around something like the following?

<p onclick="exampleFunc('<div id="divId"></div>');">Some Text</p>

That code prints to the browser:

‘);”>Some Text

  • 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-05-15T09:56:30+00:00Added an answer on May 15, 2026 at 9:56 am

    You need to use proper escaping/encoding. Either in HTML using character references:

    <p onclick="exampleFunc('&lt;div id=&quot;divId&quot;&gt;&lt;/div&gt;');">Some Text</p>
    

    Or in JavaScript using string escape sequences:

    <p onclick="exampleFunc('\x3Cdiv\x20id\x3D\x22divId\x22\x3E\x3C/div\x3E');">Some Text</p>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to nest if-else statements in Crystal Reports, but I don't know the
Is there a way to nest drag/dropables using jquery ui, without knowing how deep
Consensus is you shouldn't nest resources deeper than 1 level. So if I have
Is there a way to nest backwards in scss? In css when I want
is there any possibility to nest two forfile commands so that I can filter
I would like to know if it is possible to nest/tunnel javascript rendered sites.
Is it possible to nest HTML forms like this <form name="mainForm"> <form name="subForm"> </form>
Is there any way to nest comments in CSS? For example, when I try
I know I can nest libraries in subfolders, but can I do the same
I would like to nest multiple setPropertyActionListener 's in my commandLink but only one

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.