close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How do I clear html tags from HTMLEditor's text?

Thread began 4/16/2019 9:35 pm by randyrie405335 | Last modified 2/22/2024 11:41 am by anonymous | 551 views | 8 replies |

randyrie405335

How do I clear html tags from HTMLEditor's text?

A few months ago I had an issue with HTML tags displaying in the text uploaded to my MySQL database. You gave me this line to alter which has worked until recently:

$CKEditor_initialValue = "".($rsxxx->getColumnVal("xxxx",false)) .""; [which is now added automatically]

However this is not working on a new page I just created.

SOLVED...
I forgot to add the 'false' to the end of the PHP code line: <?php echo($rsEagleScout->getColumnVal("TextBlock",false)); ?> which properly formats the text. Could this not be added to the next DataBridge update as a matter of convenience for us?

Sign in to reply to this post

Ray BorduinWebAssist

Yes. I have this in my notes to add that automatically when using an html editor.

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

Jonas

What do I do if I just want to display the text without html tags. I have tried both strip_tags and htmlspecialchars_decode, but nothing happens. That is, tags are displayed anyway.
<?php echo strip_tags($smallStory); ?>

Sign in to reply to this post

Ray BorduinWebAssist

How did you set $smallStory?

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

Jonas

I don't think the variabel is the problem. It is set to:
<?php $smallStory = ($WADAbuckets_details->getColumnVal("sto_text")) ?>

It does not matter if I write the whole code or use a variable in this case:
<?php echo strip_tags($WADAbuckets_details->getColumnVal("sto_text")); ?>

Sign in to reply to this post

Ray BorduinWebAssist

Use:


<?php echo strip_tags($WADAbuckets_details->getColumnVal("sto_text",false)); ?>

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

Jonas

Thanks! Are there other parameters to adjust regarding the HTML editor? Where can I read more about this?

Sign in to reply to this post

Ray BorduinWebAssist

That is just to turn off the automatic cross site scripting protection when displaying the content from a recordset.

It isn't specific to html editor, but html editor produces html, which is what this protects against. Turning off the protection allows the content to be displayed in true html format, and therefor allows you to also remove the tags.

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

anonymous

Hi everyone,

I'm new to the forum and have been following this thread with interest. I had a similar issue with HTML tags appearing in my text, and the solutions mentioned here were very helpful. I found that using the strip_tags function, as suggested by Ray, worked perfectly for my case. I also appreciate the tip about adding 'false' to the end of the getColumnVal function to turn off automatic cross-site scripting protection. It's great to see such a supportive community sharing knowledge and solutions!

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