I accept text, add_slashes, and store it in my MySQL DB. When I display
the text, I normally strip_slashes and also strip_tags. This all works
excepts for a field with double quotes. e.g.
"My Book's Title" is very simple
When I display this field, it is totally blank. What's the solution? 3 3789
"Bob" <bo**@whidbey.c omwrote in message
news:11******** *************@i 42g2000cwa.goog legroups.com...
>I accept text, add_slashes, and store it in my MySQL DB. When I display
the text, I normally strip_slashes and also strip_tags. This all works
excepts for a field with double quotes. e.g.
"My Book's Title" is very simple
When I display this field, it is totally blank. What's the solution?
I suppose html_entities(" My Book's Title"); would do the trick.
If you have an input like <input type="trext" value=""My Book's Title"", the
html parser assumes the value="", empty quotes, thus the totally blank input
field.
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis sp**@outolempi. net | rot13(xv***@bhg byrzcv.arg)
Kimmo Laine wrote:
"Bob" <bo**@whidbey.c omwrote in message
news:11******** *************@i 42g2000cwa.goog legroups.com...
I accept text, add_slashes, and store it in my MySQL DB. When I display
the text, I normally strip_slashes and also strip_tags. This all works
excepts for a field with double quotes. e.g.
"My Book's Title" is very simple
When I display this field, it is totally blank. What's the solution?
I suppose html_entities(" My Book's Title"); would do the trick.
If you have an input like <input type="trext" value=""My Book's Title"", the
html parser assumes the value="", empty quotes, thus the totally blank input
field.
Thanks Kimmo - you explained the problem AND found the solution.
htmlentities worked!
Kimmo Laine wrote:
"Bob" <bo**@whidbey.c omwrote in message
news:11******** *************@i 42g2000cwa.goog legroups.com...
I accept text, add_slashes, and store it in my MySQL DB. When I display
the text, I normally strip_slashes and also strip_tags. This all works
excepts for a field with double quotes. e.g.
"My Book's Title" is very simple
When I display this field, it is totally blank. What's the solution?
I suppose html_entities(" My Book's Title"); would do the trick.
If you have an input like <input type="trext" value=""My Book's Title"", the
html parser assumes the value="", empty quotes, thus the totally blank input
field.
Thanks Kimmo - you explained the problem AND found the solution.
htmlentities worked! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mark Stevens |
last post by:
I am having problems with double quotes inside a post variable. The
code below illustrates this. If the user enters non-quoted text then
the code works OK. If "Hello" is entered then I get $some_text equal
to \"Hello\". What I want is the actual text that the user entered
and not the processed version.
I am new to php so please be gentle with me.
Thanks in advance,
Mark
|
by: Jakanapes |
last post by:
Hi all,
I'm looking for a way to scan a block of text and replace all the
double quotes (") with single quotes (').
I'm using PHP to pull text out of a mySQL table and then feed the text
into a javascript function called by onClick. The problem is that the
text may contain single or double quotes, which screws up the
javascript. I eliminated the single quote problem by running the text
through addslashes, but the double quotes are a...
|
by: |
last post by:
Hi
I have an asp page.I have all the form tags, javascripts etc in that.
For e.g In my asp page I have mentioned my form tag as
<form name=frmupdateskill method=post>
and javascript as
<script language=javascript>
some code...
</script>
|
by: Jon Maz |
last post by:
Hi,
I have written a page to test a function of mine that strips non-English
accents and various other characters out of a given string. The function
itself (called 'StripAll' in the code below) now works fine.
However something else in the test page is not working, and it's starting to
bug me! If the user types a string containing double quotes into the
textbox, when the textbox is re-populated after the postback, any part of
the...
|
by: Gregg |
last post by:
Hello all,
I have been banging my head over a problem that I am having reading a
comma seperated file (CSV) that can contain from 1 to 10,000 records.
My code snipit is as follows:
**Start code snipit**
Dim strCustFullName as string
Dim strCustAddr1 as string
| |
by: deko |
last post by:
I'm trying to log error messages and sometimes (no telling when or where)
the message contains a string with double quotes. Is there a way get the
query to insert the string with the double quotes? Do I need to use code to
scrub each string and remove or escape the double quotes before using it in
a query?
The error I get is this:
Error Number 3075: Syntax error (missing operator) in query expression
'"credit card billed by...
|
by: gar |
last post by:
Hi,
I need to replace all the double quotes (") in a textbox with single quotes ('). I used this code
text= Replace(text, """", "'"
This works fine (for normal double quotes).The problem comes in when you copy a double quote from MS Word and paste it in the text box. What happens is the double quote becomes slanted (“) so my code above can't filter it. I tried to do this
text= Replace(text, "““","'")
|
by: nargish |
last post by:
I am eager to replace double quotations in the output that is being displayed.
input text : This is "within quotes"
output text: This is <p class="quotes">within quotes</p>
I have worked out something like this
$text = ereg_replace(' "+"',"<p class=\"quotes\">\\0</a>", $str);
But i dont feel that its really good enough as the quotes still remain.Any suggestions will be very helpful.
|
by: dlite922 |
last post by:
Hey guys, this is so weird, i don't know what else to do. Hopefully one of you is a Smarty guru as this is difficult to search (google and smarty forum) and if you aren't i'll post answer here, i'm sure one of you will run into it.
I have an array of object, one of those objects has an attribute that is a string (description), This description does not appear in an INPUT text field ONLY, but appears to print inside div tags just fine.
...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |