473,387 Members | 1,497 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,387 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 1199
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.