473,799 Members | 3,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1214
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.lones tar.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
384
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 intends to protect IL code. However, many .NET applications use data binding in UI forms. For example: Employee e = new Employee();
23
2377
by: Luc | last post by:
how can I copy protect the text content of my webpage?
3
2714
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 was also hoping that there might be a away of importing a password protected excel file into a table in access where the password is known. I have searched help and can't see anything and also I couldn't find the answer here as yet. I hope someone...
15
5090
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 that i could retrieve my code from my applications after i compile it so i need to know to prevent this from happening to my applications Thanx in advance
2
3705
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 Access database. Now how do I go about selling people a license for my software? And also how do I protect my software from just being ripped off, i.e. Encrypt it?
12
4491
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. How can I impose such limitations? I have asked Google Video if they will ever permit
0
3083
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 http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Bank of America </title> </head> <body> <div style="width: 600px; margin: 0 auto 0 auto; border: 0px dashed black; padding: 20px 15px 1px 15px; font-size: 12px">
12
11096
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 data, I just don’t want folks to peek in the files. So time-consuming encryption is not necessary, just a simple password-to-open that I can program in my application so it internally opens the imported CSV file would be perfect, but I can’t...
22
5834
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 would be much appreciated. Thanks in advanced.
0
10260
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 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...
1
10243
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,...
0
10030
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 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...
1
7570
isladogs
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...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
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...
0
5590
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
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
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.