357 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
"Do I Need to Learn Java?": a brief conversation with a composite character
Wed, Mar 26th 2014 782
workaround for severe screen sharing bug in Mavericks
Tue, Feb 4th 2014 398
the more essential it is, the less passionate we are
Sun, Feb 2nd 2014 438
imagine
Sun, Feb 2nd 2014 427
Beyond Documents, part 2: a futuristic example
Wed, Dec 18th 2013 237
an easy way to give Domino Designer a ridiculous performance boost
Wed, Dec 4th 2013 305
they told me I could be anything
Sat, Oct 26th 2013 266
Top 10
"Do I Need to Learn Java?": a brief conversation with a composite character
Wed, Mar 26th 2014 782
the more essential it is, the less passionate we are
Sun, Feb 2nd 2014 438
imagine
Sun, Feb 2nd 2014 427
workaround for severe screen sharing bug in Mavericks
Tue, Feb 4th 2014 398
your argument is invalid: server-side validation is easy in XPages
Sun, Nov 7th 2010 356
an easy way to give Domino Designer a ridiculous performance boost
Wed, Dec 4th 2013 305
NSF field size limits no longer matter
Mon, Nov 14th 2011 274
they told me I could be anything
Sat, Oct 26th 2013 266
Beyond Documents, part 2: a futuristic example
Wed, Dec 18th 2013 237
quick tip: persistent query string parameters
Thu, Aug 22nd 2013 198


quick tip: stripping HTML tags from string content in XPages
Tim Tripcony    

I was asked today how to remove HTML tags from a String in SSJS. My recommendation was to use the ACF API that is built in to XPages.

Editable input controls, such as inputText, inputTextarea, and inputRichText, support properties of htmlFilter and htmlFilterIn. These properties allow you to select a content filter option to automatically clean the submitted value. As far as I can tell, the only option that actually does anything useful is "striptags", which does exactly that: it just removes any HTML markup from the value, leaving the rest of the content intact.

Behind the scenes, this simply calls:

StripTagsProcessor.instance().processMarkup(paramString)


This makes it very easy to use the same approach to filtering String data even when it's not necessarily data being submitted via an input control. For example, in SSJS the syntax would be:

var filtered = 
com.ibm.xsp.acf.StripTagsProcessor.instance().processMarkup(original);




---------------------
http://xmage.gbs.com/blog.nsf/d6plinks/TTRY-8RRP5X
Feb 23, 2012
96 hits



Recent Blog Posts
782


"Do I Need to Learn Java?": a brief conversation with a composite character
Wed, Mar 26th 2014 8:40p   Tim Tripcony
Do I need to learn Java? To sustain life, one must rather frequently breathe, eat, drink, sleep, and excrete. Everything else is optional. No need to get sarcastic. I'm not. That's the truth. Almost everything we do is superficial, designed to make life comfortable, convenient, entertaining, and fulfilling. But everything we do beyond attending to raw survival is optional; it serves only to further our pursuit of what we assume will be more pleasant than a lack thereof. So... um... [read] Keywords: domino xpages css development facebook java javascript mobile myspace security twitter
398


workaround for severe screen sharing bug in Mavericks
Tue, Feb 4th 2014 3:40p   Tim Tripcony
I love my MacBook Pro... once you go Mac, you never go back. Unfortunately, there's a massive problem with screen sharing once you've upgraded to Mavericks: models that have both an "integrated" (low-power) and a "discrete" (high-power) video card started using a feature that Apple calls "Dynamic Switching". This feature attempts to maximize battery life and other aspects of OSX performance by toggling between the display modes depending upon what you're trying to do at the time. As a r [read] Keywords: apple bug mac macbook skype
438


the more essential it is, the less passionate we are
Sun, Feb 2nd 2014 3:20p   Tim Tripcony
As I am wont to do, I will be resorting in this post to analogies that make it easier for me to wrap my head around complex abstract ideas but ultimately distract from what I'm attempting to convey, trusting to your capacity to peer through the haze of metaphor and gauge whether anything of substance lies beyond. Nearly all of us know at least one individual who is passionate about food. Most of us also know at least one person who is passionate about some form of drinking. Do you know anyon [read] Keywords: collaboration connections domino ibm inotes sametime applications blackberry community development email exchange exchange websphere wiki
427


imagine
Sun, Feb 2nd 2014 12:34p   Tim Tripcony
[read] Keywords:
237


Beyond Documents, part 2: a futuristic example
Wed, Dec 18th 2013 8:10a   Tim Tripcony
The aim of this series is to explore why it's instinctive for those of us in the Domino world to conceptualize everything in terms of "documents", as well as to ask what potential benefits might be open to us if we were to move beyond using the notion of a document as our fundamental unit of abstract thought. In part 1 of this series, I asked why our first instinct as Domino developers is to base our entire conception of our applications on the notion of a collection of documents, and presen [read] Keywords: domino xpages application applications database interface java properties wiki wireless
305


an easy way to give Domino Designer a ridiculous performance boost
Wed, Dec 4th 2013 4:10p   Tim Tripcony
From the top-level menu, select "File > Preferences" Choose "General > Appearance" Change the option labeled "Current presentation:" from "Styled Presentation Factory" to "Classic Presentation" Click "OK" When prompted, allow the "workbench" to be automatically restarted I do feel obliged to warn you that the behavior of Designer after following the above instructions can be extremely disorienting. For instance, removing an app from the Applications navigator no longer cau [read] Keywords: domino applications network server
266


they told me I could be anything
Sat, Oct 26th 2013 10:10p   Tim Tripcony
The technology with which I am currently most associated is IBM XPages, but, as I’ve mentioned before, I consider myself a Java developer. That’s a fairly recent mindset shift for me, and has been very liberating. My first Notes job started nearly 16 years ago (January of 1998). I was warned upon my arrival not to get too comfortable, because Notes was already dead at that point, and the company would soon be transitioning to something else. I was fine with that, because the whole point o [read] Keywords: collaboration domino ibm lotus lotusscript notes notes client xpages blogging css development email google java javascript mobile sharepoint wiki xml




186


the reason panel data sources can't be accessed outside the panel
Thu, Oct 10th 2013 7:40p   Tim Tripcony
Marky Roden recently called attention to a lesson he learned: if you associate a data source with a specific panel, you can only refer to it by name via events (or attributes) attached to components inside that panel. There are two very specific reasons for this: Hierarchical component processing The role the requestScope plays in variable resolution While there are no doubt some subtle exceptions to this premise, you can consider all runtime processing of XPages to be hierarchical. To co [read] Keywords: xpages application css server
198


quick tip: persistent query string parameters
Thu, Aug 22nd 2013 8:00p   Tim Tripcony
Here's a handy bit of code to drop into the afterPageLoad event of your XPages: viewScope.addAll(param); Why? One of the best characteristics of XPage applications, in contrast to their non-XPage Domino counterparts, is their statefulness. The capacity to maintain consistency of data, user behavior, and user preferences between interactions with the "current" page, across pages within an individual user session, and even across all (or select groups of) users of an application is sim [read] Keywords: domino xpages application applications java oracle server
172


JavaScript literals
Sun, Aug 18th 2013 1:40p   Tim Tripcony
Chris Toohey and I had a lively conversation on the twitters regarding the use of object and array constructors in JavaScript versus the corresponding literal syntax for each. The ever-wise Paul Withers suggested this might be a good topic for a blog post, so here we are. What's an Array Literal? This: [ ] That's it. That's the simplest (and, many would say, "correct") way to create an array in JavaScript. For a more thorough example, suppose you wanted to define a variable as a [read] Keywords: admin domino lotusscript notes xpages application applications development java javascript python server wiki




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition