close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to remove Tags HTML ?

Thread begun 6/09/2009 3:24 am by MJ | Last modified 6/09/2009 11:54 am by Ray Borduin | 4413 views | 5 replies |

MJ

How to remove Tags HTML ?

Hello,

I would like to prohibit (or remove) the use of tags HTML in the fields of the form.

I would like to use the function php strip_tags, but I do not see how to do this.

For example with : strip_tags($comments);

You can help me ?

Thanks, Mj.

Sign in to reply to this post

Ray BorduinWebAssist

Do you want to strip them before they are inserted to the database, or only when they are displayed? If so, find where that line is set or displayed and add the function reference as you have provided. It should be as simple as that.

Sign in to reply to this post
Did this help? Tips are appreciated...

MJ

Hello,

Thanks for your answer. :)

In fact, I used the function on the "thankyou.php" page and the file "contactus.php" :

<?php echo (strip_tags(str_replace("\n","<BR />",$pval))); ?>

It seems to function correctly.

>> Do you want to strip them before they are inserted to the database,
1) Yes, it would be possible to use the function to avoid injection SQL ?

2) I would like to also record the email in a file CSV.
There is a possible solution ?

Thanks for your assistance.

Mick

Sign in to reply to this post

Ray BorduinWebAssist

1) HTML has nothing to do with SQL injection. You don't need to add it to prevent injection... maybe cross-site scripting, but that can be handled on the display side or the database side with equal results.

2) WebAssist does not offer a solution for writing a file. This is relatively easy to do in php with a little scripting.

Sign in to reply to this post
Did this help? Tips are appreciated...

MJ

I have a last question.

The form is protected from the injection email headers ?

Thanks for your patience !

Mick

Sign in to reply to this post

Ray BorduinWebAssist

We have not had any recent reports of email header injection, but I imagine it would be possible to create an email form that could be attacked in that way, but nobody has reported a problem at the same time.

Any time you are referring to a form post directly, you should be concious of email injection and cross site scripting holes opened by how you are using that form element. If anyone does find a email injection hole please report it as soon as possible.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...