Avatar of CipherIS
CipherISFlag for United States of America

asked on 

HTML <font style="color:red">

I am inserting the subject value into the database.  I replaced the " with ''' (3 quotes).  It saves it in the database as one '.  How can I save it so it produces double quotes for the webpage?
HTMLSQLMicrosoft SQL Server

Avatar of undefined
Last Comment
Vitor Montalvão
Avatar of Juan Ocasio
Juan Ocasio
Flag of United States of America image

You have to save it with 4 quotes to get double quotes
Avatar of CipherIS
CipherIS
Flag of United States of America image

ASKER

Thanks

It broke the web page.  Hmm.  Works with the single quotes but it should be double.
Avatar of Juan Ocasio
Juan Ocasio
Flag of United States of America image

What are you trying to insert into the database?  If you're trying to insert

HTML <font style="color:red">

you just need to surround with single quotes:

'HTML <font style="color:red">'
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

I am inserting the subject value into the database.  I replaced the " with ''' (3 quotes).  It saves it in the database as one '.  How can I save it so it produces double quotes for the webpage?
Can you provide the codes how you save the value into database?

and how you display it into HTML?

in this case, we may need to do some encoding either at database or HTML (server side scripting) end.
Show us the code so we can check for any typo or something that might be missing.
Avatar of CipherIS
CipherIS
Flag of United States of America image

ASKER

Below is the code.  It works as expected on the website when it pulls the data.  
UPDATE PART
SET [description] = '<font style=''color:red''><b>NOTE: This Option is No Longer Available for New Designs</b></font><br/>None',
html_description = '<font style=''color:red''><b>NOTE: This Option is No Longer Available for New Designs</b></font><br/>None'
WHERE id = 1

Open in new window

The command seems correct to me. You just need to double the single quote to have it stored as single quote.
Avatar of CipherIS
CipherIS
Flag of United States of America image

ASKER

It is storing it as a single quote.
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo