The eAuction Support Forums
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl eAuction 1.6.1.x >> Addon Proposals >> text area https://www.everyscript.de/cgi-bin/yabb/YaBB.pl?num=1136494520 Message started by Volf on 01/05/06 at 21:55:20 |
Title: text area Post by Volf on 01/05/06 at 21:55:20 Hello, I wish to implement description in textarea, and this is simple to do, but i have one problem, all text is in one line. and i dont like it. Things must be simple for users, when user pres ENTER button, he expect to get a new line. like in notepad like this, not like this: when user pres ENTER button,he expect to get a new line. like in notepadlike this, when you post auction, everything looks ok, but when you open preview, or item page all text is in one line again. I need a litle help to find solution. and when finished, I will post it to forum. Also i would like to know opinion about safety aspect of this (because there is no html input from users) and are disable &enable_html, and strip_scripts needed in this case, (maybe disable &enable_txt will be solution???) Thanks, and sorry for my bad english, I hope you will understand my question. |
Title: Re: text area Post by Dieter Werner on 01/05/06 at 23:41:07 Volf wrote:
That's the way a <textarea> field works :'( But you can change each '\n' into '<br>' |
Title: Re: text area Post by Volf on 01/06/06 at 22:54:24 Hi Dieter, No, I don’t think so, this is not a problem with text area. i have already managed text area to display new rows by converting <br> to /n, Maybe I have not explained good what i intent to do, I want to display <textarea> instead of html_description in Sub: Display Item 1.when user post new auction, he press ENTER button for new row, and everything looks ok, 2.when he go to preview, ( mine is changed also <textarea> for description) all text is in one row, 3.and finaly when he go to his new auction,( mine is changed also <textarea> for description) all text in one row again. I am aware that script store $desc data in one row, and what i need to finish it is to make script to write <br> in data file (when user pres enter) , and again to read <br> and print \n when displaying it.( this part is done) $line =~ s/\<br\>/\n/gi; Could you help? Reason for replacing html description with textarea: (my private opinion) 1.As you already know, small auction sites are not made for experienced sellers, it is painful job to learn all members how to input HTML code, Also they do not read any help or FAQ, they usually think your site is not functioning, and go away, forever. Very bad outcome. 2. Increased security 3. More user friendly auction I would also like to hear your opinion about safety aspect of preventing users to input any html code in auction. Thank you for your time, and kind help. |
Title: Re: text area Post by Dieter Werner on 01/07/06 at 12:45:31 This line ... $line =~ s/\<br\>/\n/gi; is wrong, because the browser doesn't know the meaning of \n. |
Title: Re: text area Post by Volf on 01/07/06 at 12:58:37 Yes, it may be wrong for browser, but not for textarea. As I have already said, i do not intent to display HTML description at all, anywhere. only descriptions as text, in <textarea> In that case who cares about browser? I am sure that all browser will read text, am I wrong? |
Title: Re: text area Post by Dieter Werner on 01/07/06 at 14:36:40 Yes, you are wrong. <textarea></textarea> are HTML tags. That means: <textarea name="DESC">The text of item description</textarea> is just what you called 'html_description'. The value of <textarea> can contain HTML tags as well as plain text too. As for the security ... You better should use the patch that I posted to the forums http://www.everyscript.de/cgi-bin/yabb/YaBB.pl?num=1112793026 |
Title: Re: text area Post by Volf on 01/07/06 at 18:28:28 First, thanks for member status "developer", and for your fast replies to my questions. About text area, and html code, I see now - you are right. Only text area still have some advantages, (my private opinion) Predefined size, Speed, Users cannot put links and images in it. Users do not have to know html, And maybe the most important of all, they cannot make site ugly and slow (for example: like some sellers do on ebay) Maybe it is not that bad idea to have this option too? For security, I see... will use patch, thanks. |
Title: Re: text area Post by Dieter Werner on 01/07/06 at 18:47:22 Sorry, but it seems as if you are in a wrong idea about the HTML tag <textarea> This HTML tag is just an INPUT function and it shouldn't be used to display something to the user (except: the EDIT function that is only accessible for the seller). Do you agree? |
Title: Re: text area Post by Volf on 01/07/06 at 19:56:03 You are more expericend in this metter, if you say taht <textarea> is for INPUT only, not for OUTPUT, I see now reason not to belive you. I forgot to mention it, textarea can be disabled, and used for output. maybe you will disagree, or agree... textarea is not really important, approach to solution is. Anyway, it was just an idea to simplyfy things, make auction more user friendly, and prevent users to ruin your site,(malicious or accidentaly) and thay are capable to do it, I am sure that you better now that. textarea is not really important, approach to solution is. Theoretically, the best solution is not to filter what users input, and to think about all combinations they can use. painfull job. By allowing only predefined input, and disallowing everything else, programer have significantly less to work on that part of code, and suprises & ommisions are almost eliminated. Do you agree? |
Title: Re: text area Post by Dieter Werner on 01/14/06 at 18:17:52 No - I don't agree ... but the most important thing I can't agree into, is the fact, that you have replaced my copyright notice with yours. You did a serious violation of the license conditions! You can use my code for free ... but please, don't steal my code! |
The eAuction Support Forums » Powered by YaBB 2.2! YaBB © 2000-2007. All Rights Reserved. |