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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:47:49+00:00 2026-05-30T15:47:49+00:00

I’m trying to replace the " ‘ " character with the " ” "

  • 0

I’m trying to replace the "'" character with the "''" string using the replace method, like this:

temp.replace("\'", "''");

But it seems that it is not replacing anything. How should I write the command in order to replace the wanted character with the wanted string? (I’m trying to replace it in the following XML file.)

<Module ForceTabs="1">
    <Events>
        <Event Value="onafter_moduleinit_beforedraw()" Type="onafter_moduleinit_beforedraw"/>
    </Events>
    <Section Id="Header" Type="header" Caption="Header" ContainerCSS="background:#C1E0F4;border-bottom:2px groove;margin-bottom:3px;padding:10 3 3 3">
        <Containers>
            <Form Id="Header" Caption="General Details" Source="Request" Layout="Fixed">
                <Layout>
                    <table cellaspacing="0" cellpadding="0">
                        <tr>
                            <td>
                                <ControlRef Id="Origin" ShowCaption="1"/>
                            </td>
                            <td>
                                <ControlRef Id="Type" ShowCaption="1"/>
                            </td>
                            <td>
                                <ControlRef Id="Process" ShowCaption="1"/>
                            </td>
                            <td width="20" align="center">
                                <span class="separator"/>
                            </td>
                            <td>
                                <ControlRef Id="FindBy" ShowCaption="1"/>
                            </td>
                            <td>
                                <ControlRef Id="Find"/>
                            </td>
                            <td>
                                <button width="30" onclick="doFindCustomer()">
                                    <Caption Caption="GO"/>
                                </button>
                            </td>
                        </tr>
                    </table>
                </Layout>
                <Controls>
                    <Control Id="Origin" Caption="Origin" FieldName="Origin" DataType="string" Width="90" CaptionWidth="70" ReadOnly="1" Mandatory="1" Hidden="1"/>
                    <Control Id="Type" Caption="Type" FieldName="Type" DataType="select" Width="60" CaptionWidth="40" ReadOnly="1" Mandatory="1" DefaultValue="Service" Hidden="1">
                        <Member Value="Allert" Caption="Allert"/>
                        <Member Value="Service" Caption="Service"/>
                        <Member Value="Marketing" Caption="Marketing"/>
                    </Control>
                    <Control Id="Process" Caption="Process" FieldName="Process" DataType="string" Width="90" CaptionWidth="70" ReadOnly="1" Mandatory="1" Hidden="1"/>
                    <Control Id="FindBy" Caption="Find:" VCaption="Find By" FieldName="FindBy" DataType="select" Width="90" CaptionWidth="50" ReadOnly="0" Mandatory="0" CaptionCSS="font-weight:bold" DefaultValue="IMTSI">
                        <Member Value="IMTSI" Caption="IMTSI"/>
                        <Member Value="ID" Caption="ID"/>
                    </Control>
                    <Control Id="Find" Caption="Find Value" FieldName="Find" DataType="string" Width="90" CaptionWidth="60" ReadOnly="0" Mandatory="0" CaptionCSS="font-weight:bold"/>
                </Controls>
            </Form>
        </Containers>
    </Section>
    <Section Id="1" Type="page" Caption="Message Details">
        <Containers>
            <Form Id="General" Caption="General Details" Source="Request" Layout="Fixed">
                <Controls>
                    <Control Id="MessageType" Caption="Message Type" Source="Param[@Name = 'MessageType']" FieldName="Value" DataType="select" Width="150" CaptionWidth="120" ReadOnly="1" Mandatory="1" DefaultValue="Allert" Action="handleMessageTypeChange()" BreakAfter="0">
                        <Member Value="SMS" Caption="SMS"/>
                        <Member Value="EMAIL" Caption="EMAIL"/>
                        <Member Value="ATOS" Caption="ATOS"/>
                        <Member Value="SELF SERVICE" Caption="SELF SERVICE"/>
                    </Control>
                    <Control Id="Language" Caption="Language" Source="Param[@Name = 'Language']" FieldName="Value" DataType="string" Width="100" CaptionWidth="90" ReadOnly="1" BreakAfter="1"/>
                    <Control Id="FirstName" Caption="First Name" Source="Param[@Name = 'FirstName']" FieldName="Value" DataType="string" Width="350" CaptionWidth="120" BreakAfter="1"/>
                    <Control Id="LastName" Caption="Last Name" Source="Param[@Name = 'LastName']" FieldName="Value" DataType="string" Width="350" CaptionWidth="120" BreakAfter="1"/>
                    <Control Id="IMTSI" Caption="IMTSI" Source="Param[@Name = 'IMTSI']" FieldName="Value" DataType="string" Width="350" CaptionWidth="120" BreakAfter="1" Mandatory="0"/>
                    <Control Id="Mobile" Caption="Mobile" Source="Param[@Name = 'Mobile']" FieldName="Value" DataType="string" Width="350" CaptionWidth="120" BreakAfter="1" Mandatory="1"/>
                    <Control Id="Email" Caption="Email" Source="Param[@Name = 'Email']" FieldName="Value" DataType="string" Width="350" CaptionWidth="120" BreakAfter="1" Mandatory="0"/>
                    <Control Id="Subject" Caption="Subject" Source="Param[@Name = 'Subject']" FieldName="Value" DataType="string" Width="350" CaptionWidth="120" BreakAfter="1" MaxLen="40" Hidden="1"/>
                    <Control Id="Content" Caption="Content" Source="Param[@Name = 'Content']" FieldName="Value" DataType="longstring" Width="350" CaptionWidth="120" Height="60" BreakAfter="1" MaxLen="50" Mandatory="1" SeparateBefore="1" SeparateAfter="1"/>
                    <Control Id="Sender" Caption="Sender" Source="Param[@Name = 'Sender']" FieldName="Value" DataType="string" Width="350" CaptionWidth="120" ReadOnly="1" BreakAfter="1"/>
                    <Control Id="Priority" Caption="Priority" Source="Param[@Name = 'Priority']" FieldName="Value" DataType="select" Width="350" CaptionWidth="120" BreakAfter="1" DefaultValue="LOW">
                        <Member Value="LOW" Caption="Low" Glyf="../../GUIGenerator_V2/assets/themes/Images/flag_blue.png"/>
                        <Member Value="MED" Caption="Medium" Glyf="../../GUIGenerator_V2/assets/themes/Images/flag_yellow.png"/>
                        <Member Value="HIGH" Caption="High" Glyf="../../GUIGenerator_V2/assets/themes/Images/flag_red.png"/>
                    </Control>
                </Controls>
            </Form>
        </Containers>
    </Section>
</Module>

I must replace the single quote to two single quotes. I can’t change it to ", but to ''.

  • 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-30T15:47:51+00:00Added an answer on May 30, 2026 at 3:47 pm
    while (str.indexOf("'") >= 0)
        {
            var newStr = str.replace("'", "\"");
            str = newStr;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
Does anyone know how can I replace this 2 symbol below from the string
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.