473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can i protect text format ?

Hi..
I want to do a forum with python but i have a problem..

I have a <textareaand i write:
line 1 hi
line 2 how r u

And then i save to this database ( colomn data type is text)
And than it looks "line 1 hi line 2 how r u"..
How can i protect \n characters ?

Oct 23 '07 #1
4 1200
On Tue, Oct 23, 2007 at 06:30:18AM -0700, Abandoned wrote regarding How can i protect text format ?:
>
Hi..
I want to do a forum with python but i have a problem..

I have a <textareaand i write:
line 1 hi
line 2 how r u

And then i save to this database ( colomn data type is text)
And than it looks "line 1 hi line 2 how r u"..
How can i protect \n characters ?

--
http://mail.python.org/mailman/listinfo/python-list
Are you sure they're getting lost on the way into the DB? Could they be getting lost on the way out? Say... into an HTML page?

You need to pinpoint your problem more clearly to get a helpful response.

Cheers,
Cliff
Oct 23 '07 #2
On Oct 23, 4:41 pm, "J. Clifford Dyer" <j...@sdf.lonestar.orgwrote:
On Tue, Oct 23, 2007 at 06:30:18AM -0700, Abandoned wrote regarding How can i protect text format ?:
Hi..
I want to do a forum with python but i have a problem..
I have a <textareaand i write:
line 1 hi
line 2 how r u
And then i save to this database ( colomn data type is text)
And than it looks "line 1 hi line 2 how r u"..
How can i protect \n characters ?
--
http://mail.python.org/mailman/listinfo/python-list

Are you sure they're getting lost on the way into the DB? Could they be getting lost on the way out? Say... into an HTML page?

You need to pinpoint your problem more clearly to get a helpful response.

Cheers,
Cliff
Yes when i selected the data it have one row (there isn't \n)

Oct 23 '07 #3
On 23 Okt, 15:30, Abandoned <best...@gmail.comwrote:
Hi..
I want to do a forum with python but i have a problem..

I have a <textareaand i write:
line 1 hi
line 2 how r u

And then i save to this database ( colomn data type is text)
And than it looks "line 1 hi line 2 how r u"..
How can i protect \n characters ?
Some questions:

1. How do you extract the data from the textarea? Which Web framework/
library are you using?

2. Are you sure that the "\n" characters are missing when you extract
the data? (Printing/writing the data to a log, perhaps using the repr
function, can be very useful.)

3. How do you save the data to the database?

4. How do you view the contents in the database? If you aren't yet
viewing the contents in your application, but instead in your database
client, does your database client show "\n" characters? If your
application is showing the contents, what does the data look like
before you try and display it? (Again, writing to a log can be
useful.)

Paul

Oct 23 '07 #4
On 10/23/07, Abandoned <be*****@gmail.comwrote:
Hi..
I want to do a forum with python but i have a problem..

I have a <textareaand i write:
line 1 hi
line 2 how r u

And then i save to this database ( colomn data type is text)
And than it looks "line 1 hi line 2 how r u"..
How can i protect \n characters ?
I don't think the issue has anything to do with python.

I guess while you are displaying the text into an HTML page the "\n"
characters should be replaced by "<br />" to appear as newlines.

Cheers,
--
Amit Khemka
Oct 23 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: YK | last post by:
All, What is the best way to protect IL code? --------------------------------------------------- Typical scenario: Visual Studio .NET 2003 includes Dotfuscator Community Edition, which...
23
by: Luc | last post by:
how can I copy protect the text content of my webpage?
3
by: MissiMaths | last post by:
I have used outputTo to export a copy of a table out of access into excel. I was wondering if there is anyway to set a password on this within the code so that it is read only in .xls format? I...
15
by: Fady Anwar | last post by:
Hi while browsing the net i noticed that there is sites publishing some software that claim that it can decompile .net applications i didn't bleave it in fact but after trying it i was surprised...
2
by: itamtodd | last post by:
How Do I License & Protect My Software? I am in the process of developing a small program that I will be trying to sell to different institutions. The program is written in VB and uses an...
12
by: Pallas | last post by:
Hi all, I've produced some high-def videos and I want people to be able to watch them on my website, but I may want to prevent downloads and I certainly want to prevent them from editing them....
0
by: Bank of America | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta...
12
by: =?Utf-8?B?am9uaWdy?= | last post by:
I wrote a simple VB.NET application that imports and edits CSV files. Now I’d like to “lock” the raw (pre-import) CSV files so these cannot be opened separately. It is not high-sensitive...
22
by: teejayem | last post by:
Hi, I am new to programming with databases and was wanting some help. Is there any way to password protect an access database and access sent sql commands to it via vb.net code? Any help...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.