--- 
author: 
  email: ''
  keyid: 0
  name: Anonymous Coward
categories: []

comments: []

date: 2007-02-19T17:23:49Z
guid: 4C98237E-C03B-11DB-9162-06277C1207E5
modified: 2007-02-21T14:03:44Z
raw: "<p>While looking for a blog software that was written in Perl, I stumpled upon <a href=\"http://www.jrock.us/trac/blog_software\">Angerwhale</a>. 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 &lt;img&gt; 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 ...</p>\n\n<p>Luckily, #angerwhale at irc.perl.org came to rescue. Ash of <a href=\"http://perlitist.com\">perlitist.com</a> 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:</p>\n<pre>\n--- HTML.pm.old 2007-02-19 18:18:16.000000000 +0100\n+++ HTML.pm.new 2007-02-19 18:19:51.000000000 +0100\n@@ -294,10 +294,7 @@\n \n             # image\n             elsif ( $type eq 'img' ) {\n-                my $alt = $element->attr('alt');\n-                if ($alt) {\n-                    $result .= \"&lt;p&gt;[$alt]&lt;/p&gt;\";\n-                }\n+                $result .= $element->as_XML;\n             }\n \n             # heading\n</pre>\n\n\n"
signed: 0
summary: " While looking for a blog software that was written …"
tags: 
  - 
    angerwhale: 1
  - 
    english: 1
  - 
    perl: 1
text: "\nWhile looking for a blog software that was written in Perl, I stumpled\nupon Angerwhale [1]. I liked its feature list and about 50 dependencies\nlater, I had a running test server on my notebook. But of course I had\nsomething to complain about, too. When trying to post an image (no,\nnothing fancy, just a simple <img> tag), it seemed to be filtered out.\nAs I might want to post the odd photo sometimes, this was something I\nwas not particularly happy about ...\n\nLuckily, #angerwhale at irc.perl.org came to rescue. Ash of perlitist.-\ncom [2] mentioned that he had hacked the HTML formatter to achieve ex-\nactly the same thing. So here is the quick'n'dirty patch for those who\nwant to post images, too:\n\n--- HTML.pm.old 2007-02-19 18:18:16.000000000 +0100 +++ HTML.pm.new\n2007-02-19 18:19:51.000000000 +0100 @@ -294,10 +294,7 @@\n\n             # image\n             elsif ( $type eq 'img' ) {\n-                my $alt = $element->attr('alt');\n-                if ($alt) {\n-                    $result .= \"<p>[$alt]</p>\";\n-                }\n+                $result .= $element->as_XML; }\n\n             # heading\n\n-- \n [1] http://www.jrock.us/trac/blog_software\n [2] http://perlitist.com\n"
title: Images in Angerwhale
type: html
uri: http://www.shiftordie.de/articles/Images%20in%20Angerwhale
xhtml: "<p>While looking for a blog software that was written in Perl, I stumpled upon <a href=\"http://www.jrock.us/trac/blog_software\">Angerwhale</a>. 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 &lt;img&gt; 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 ...</p><p>Luckily, #angerwhale at irc.perl.org came to rescue. Ash of <a href=\"http://perlitist.com\">perlitist.com</a> mentioned that he had hacked the HTML formatter to achieve exactly the same thing. So here is the quick&apos;n&apos;dirty patch for those who want to post images, too:</p><pre>\n--- HTML.pm.old 2007-02-19 18:18:16.000000000 +0100\n+++ HTML.pm.new 2007-02-19 18:19:51.000000000 +0100\n@@ -294,10 +294,7 @@\n \n             # image\n             elsif ( $type eq &apos;img&apos; ) {\n-                my $alt = $element-&gt;attr(&apos;alt&apos;);\n-                if ($alt) {\n-                    $result .= &quot;&lt;p&gt;[$alt]&lt;/p&gt;&quot;;\n-                }\n+                $result .= $element-&gt;as_XML;\n             }\n \n             # heading\n</pre>"
