Skip to main content
Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.


Member since Apr 9, 2009

Recent Blog Comments By trifide

  • Ask Ben: Closing XHTML Tags In A Truncated Message

    Posted on Apr 9, 2009 at 3:43 AM

    Is there a cfm version of getLeadingHtml javascript function by Steven? <code> function getLeadingHtml (input, maxChars) { // token matches a word, tag, or special character var token = /\w+|[^\w<]|<(\/)?(\w+)[^>]*(\/)?>|</g, selfClosingTag = /^(?:[hb]r|img)$/i, output = "",... read more »