shift or die

yapb — yet another perl blog

[LOGO] alech's blog. Perl, Security, Curiosities, Links, Rants, Photos, yadayada

Navigation

Home | Articles

Tags

  • 2009challenge
  • 202c
  • angerwhale
  • chaosradio
  • darmstadt
  • deutsch
  • dns
  • dpw9
  • english
  • ffm
  • firefox
  • funny
  • gpw9
  • kite
  • md5
  • mifare
  • mrmcd
  • mrmcd111b
  • muenchen
  • music
  • nexenta
  • openbc
  • openxpki
  • osx
  • perl
  • ph-neutral
  • photos
  • rant
  • security
  • snowboarding
  • spaces
  • unicode
  • vbscript
  • vegetarisch
  • virtuedesktops
  • vorratsdatenspeicherung
  • xing

Login

Not logged in. Log in.

Images in Angerwhale

Tags: angerwhale english perl [+]

Posted on 2007-2-19 (月) at 6:23 pm

While looking for a blog software that was written in Perl, I stumpled upon Angerwhale. I liked its feature list and about 50 dependencies later, I had a running test server on my notebook. But of course I had something to complain about, too. When trying to post an image (no, nothing fancy, just a simple <img> tag), it seemed to be filtered out. As I might want to post the odd photo sometimes, this was something I was not particularly happy about ...

Luckily, #angerwhale at irc.perl.org came to rescue. Ash of perlitist.com mentioned that he had hacked the HTML formatter to achieve exactly the same thing. So here is the quick'n'dirty patch for those who want to post images, too:

--- HTML.pm.old 2007-02-19 18:18:16.000000000 +0100
+++ HTML.pm.new 2007-02-19 18:19:51.000000000 +0100
@@ -294,10 +294,7 @@
 
             # image
             elsif ( $type eq 'img' ) {
-                my $alt = $element->attr('alt');
-                if ($alt) {
-                    $result .= "<p>[$alt]</p>";
-                }
+                $result .= $element->as_XML;
             }
 
             # heading

Last modified: 2007-2-21 (水) at 3:03 pm

Comments on Images in Angerwhale | no comments | Post a comment

[YAML] [XML]


Page generated by Angerwhale version 0.03 (390 ) on 2010-7-31 (土) at 7:15 pm.

Valid XHTML. Valid CSS. Valid SVG. (If you're seeing this, though, you need a better browser so you can actually see them!)