Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Stripping out html tags

Featured Replies

Is there a simple way to strip all html tags from a piece of text held in a text field, so that you are left with just the text that is not enclosed by any tag?

If it really can be regarded as simple, is a good question - but a friend of mine have done this:

http://www.briandunning.com/cf/522

But beware, dependencies exists to two other CF's...

--sd

The CF will not let you close the CF Edit box until you replace the Fields used, System::String1 and System::String2, with your own TO name. i.e. if your TO name is Contact, they would need to be changed to Contact::String1 and Contact::String2.

HTH

Lee

I'm not sure if this is applicable to your situation, but if the HTML is in a webviewer initially, setting the URL to

javascript:a=document.body.innerHTML;var mydiv = document.createElement("div");mydiv.innerHTML=a;document.content=mydiv.innerText;

will strip all tags from it and return the results to the webviewer from which it can be read into a field. You can alternately strip the tags using a regular expression within the JS; if you place text from a field into the webviewer, this allows the regex to be operate on that text. Since FM has no inbuilt regex support this simplifies some more complex text manipulations.

I tried removing tags from HTML a couple years ago with a script, but it was very slow for long documents -- but then, my script might have been inefficient.

  • 7 months later...

the above stated method does not seem to work for me. My webviewer keeps on loading the javascript:a.... request/url.

Is there something I am doing wrong?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.