close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to strip slashes in generated e-mail?

Thread began 5/23/2009 2:53 pm by Martin | Last modified 5/27/2009 11:16 am by Martin | 1734 views | 6 replies |

Martin

How to strip slashes in generated e-mail?

Hi there,

I was wondering if you had a tutorial or a how to strip slashes from the generated e-mails using UE 3.05?

It is very annoying to have a nicely created e-mail and then see slashes breaking apart words.

Is there a specific way to do it with UE?

Thanks!

Martin

Sign in to reply to this post

Ray BorduinWebAssist

What server language? Where are they occurring? You can probably add a stripslashes() function where applicable to strip slashes.

Sign in to reply to this post

Martin

Hi Ray,

I am using PHP, the slashes are showing up in the final sent e-mail.

So how would I apply a function to the UE scripts in order to stripslashes and to prevent words like

your's from showing up like your\s

which can look very unprofessional. Also would this not apply if I was capturing the generated e-mail to a database?

Thanks,

Martin

Sign in to reply to this post

Ray BorduinWebAssist

I assume you are getting the value from a form.

Just wherever you refer to a value in your body like:

<?php echo($somecodehere); ?>

instead use:

<?php echo(stripslashes($somecodehere)); ?>

Sign in to reply to this post

Martin

Hi Ray,

Ok, so I follow you. So the code generated by UE is for example

<?php echo ((isset($_POST["studentName"]))?$_POST["studentName"]:"")?>

So I would then change it to look like this ?

<?php echo (stripslashes((isset($_POST["studentName"]))?$_POST["studentName"]:""))?>

Is this correct?

Would this be a nice feature addition to the body tab in UE?

Thanks again!

Martin

Sign in to reply to this post

Ray BorduinWebAssist

You could probably just turn off magicQuotesGPC on the server as well. That is what is adding the slashes.

Sign in to reply to this post

Martin

Sorry I do not have that kind of access to the server settings. So I have to code it myself.

Did that code look correct to you?

<?php echo (stripslashes((isset($_POST["studentName"]))?$_POST["studentName"]:""))?>

As I mentioned, having UE add the stripslashes would be a nice feature addition =)

Thanks again,

Martin

Sign in to reply to this post

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...