Hinnerk Altenburg

Web Developer in Hamburg, Germany

Archive for the ‘OpenSource’ tag

Strip all HTML tags with Perl like PHP’s strip_tags() does

without comments

The Perl regular expression (regexp/regex) equivalent to PHP’s strip_tags() is:

while ($string =~ s/<\S[^<>]*(?:>|$)//gs) {};

Please note that it also denotes an opening “<” (followed by a non-whitespace character) as a tag and strips all characters behind, even it is not closed by a “>”. This is the same behavior as PHP’s strip_tags().

Update: This regexp is only satisfying my test against PHP 4.x, but 5.x is pretty smarter when it comes to edge cases. It will be a challenge to build a Perl equivalent as all the different approaches in CPAN also fail the test.

Written by Hinnerk

December 23rd, 2009 at 2:30 pm

Posted in English, Web

Tagged with , , ,

OpenSource Perl Website Intrusion Detection System PerlIDS (CGI::IDS) released

with one comment

Today, we at epublica have officially released my work of the last months – a Perl port of PHPIDS, a tool for detection of Cross-Site-Scripting (XSS), Cross-Site-Request-Forgery (CSRF), SQL-Injections (SQLI), Local-File-Inclusions (LFI) etc. in website requests.
The tool is released as CGI::IDS Perl module ‘PerlIDS’ on CPAN.org under the OpenSource ‘Lesser GNU Public License’ (LGPL).

Read the rest of this entry »

Written by Hinnerk

November 6th, 2008 at 1:36 pm

Posted in English, Web

Tagged with , , , , ,

Two TYPO3 OpenSource extensions published

without comments

I am now the author of two TYPO3 extensions published in TER (TYPO3 Extension Repository). These extensions are frontend plugins that add functionality to the mm_forum extension.

exinit_latesttopics displays the latest forum topics in a box, exinit_pollwidget displays an AJAX box for forum polls to make voting possible on any page.

Written by Hinnerk

June 25th, 2008 at 12:20 am

Meet me at FOSS.in/2005 Open Source Conference in Bangalore

without comments

The FOSS.in/2005 Free & Open Source Software Conference is from November 29 to December 2 at Bangalore Palace. I am listening to several lectures.
You’re welcome to join me if you are in Bangalore.

Written by Hinnerk

December 1st, 2005 at 9:56 am

Posted in English, Personal

Tagged with , ,