Forum Discussion
Inactive User
Have you run into any errors with this snippet due to the string being parsed being too long? I'm getting StackOverflowError: null errors in that case.
AdamN
12 years agoKhoros Oracle
That's odd. I don't recall seeing anything like that before. How many characters is the string you're dealing with?
There's actually a newer method for truncating strings that you may want to check out to see if it works better for you:
http://lithosphere.lithium.com/t5/support-knowledge-base/Character-truncation-variables/ta-p/38324
- Inactive User12 years ago
Nice. That's going to be helpful. Does it strip out html though?
- KaelaC12 years agoLithium Alumni (Retired)
For stripping out HTML you can use this new util:
Strips HTML using the google gdata html stripper, which does the following:
- Converts <br> and <p> tags to new lines
- Converts <li> tags to new line and adds a dash
- Strips remaining tags
- Adds newlines after 72 characters (for readability and conformance with email standards)
${utils.html.stripper.from.gdata.strip("<p>hello <b>world</b><strong>!</strong>")
Related Content
- 4 years ago
- 2 years ago