devbox@COMPUTEC The Computec development blog

19Jun/092

Super sexy jQuery hierarchical menu for nondevelopers

It all started when I start looking for menu library for project I am working on.
Since jQuery was my framework of choice I wanted to find either plugin or inline code written in jQuery.
Surprise one. Google returns absolutely nothing. LOL. How it can be?! I mean, that's one of the most popular libraries written in JavaScript in last decade (and more). Next step was to check jQuery official plugin repository. There was much better situation and found 65(!) plugins in "menu" group.

17Jun/090

What if HTMLEditFormat() don’t cut it?

You know of course that you need to HTMLEditFormat() any user input that you intend to display somewhere on your page to avoid racing down the road to XSS hell; to save on processing resources the best time to do this would obviously be before the data goes to your persistance layer (be it some physical file or most likely a database).

If all you want to do is allow your users to store some plain old text, maybe seasoned with some kind of BB-code markup to allow for some limited text formatting, this method is just fine. If that is not enough and you actually need to allow a limited amount of good old HTML, you'll need some more sophisticated sanitizing mechanism to parse out any potentially harmful code elements like JavaScript actions and the like.

15Jun/0917

ColdFusion-UDF Wrapper for JTidy to clean up HTML

JTidy is a Java port of HTML Tidy, which allows you to clean up messy HTML. This comes in useful when you need to output some Code which has been created by users. I'll show in some later post how to allow users to actually enter HTML without compromising the security of your site, today I'll just show how to clean up this user-generated code. JTidy will not only generate XHTML-valid code from incomplete code by correctly closing opened tags, it will also do a couple of "prettifying" operations to increase quality of the result.