close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

mailto content, getting info from database, stripping html tags

Thread began 7/14/2020 7:28 am by lr_leal239405 | Last modified 7/14/2020 11:07 am by Ray Borduin | 531 views | 3 replies |

lr_leal239405

mailto content, getting info from database, stripping html tags

Would you know why when I have a mailto: it doesn't remove the the html tags? It's pulling from database with all the tags <p>, <a href=, <br>, etc.

I've tried strip_tags($mycontent) and html_entity_decode($mycontent), but it just keeps pulling all the tags into the email.

I would like this "<p>[first_name],<br /><br />Thank you for your past orders for..." as "Thank you for your past orders for..."

It works only when I copy and paste already decoded text directly from browser but not thru mailto:

Let me know if you can help. Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

Use strip_tags() and pass the "false" parameter to the getColumnValue() reference to ensure the tags aren't already encoded like:

php:
<?php echo strip_tags($WADAemtemplate->getColumnVal("emtemplate_content"false)); ?>
Sign in to reply to this post
Did this help? Tips are appreciated...

lr_leal239405

Great. Thanks. I think the 'false' parameter did it. It literally strips off the tags so my <a href's become dead links, the list items <li> and all the content becomes one paragraph. How do I then make it so that it interprets the html on the mailto (from the db), rather than strip it off so I would like to keep the formatting for example on the following:

Sign in to reply to this post

Ray BorduinWebAssist

I've never done this, and there is no built in method in php that I know of... but a quick search for "php convert html to plain text" came back with:

https://github.com/mtibben/html2text

That might be something that would work for you.

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