diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-05-28 19:07:38 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-05-28 19:07:38 +0000 |
commit | 330bbd03df8f41cf6e8036dbfc764dabddcd6715 (patch) | |
tree | 68260e3683cb951451e90f8ac7a1e5d2fd409d8b /IkiWiki | |
parent | 51d7da8c8785f47417c5d50b55daad78f65155ce (diff) | |
download | ikiwiki-330bbd03df8f41cf6e8036dbfc764dabddcd6715.tar ikiwiki-330bbd03df8f41cf6e8036dbfc764dabddcd6715.tar.gz |
* Apply a patch from Carl Worth allowing a class attribute to be passed
through the img plugin. Also allow the id attribute to be passed through.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/img.pm | 5 | ||||
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index b1c9db80c..cff9dabf0 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -98,7 +98,10 @@ sub preprocess (@) { #{{{ return '<a href="'.$fileurl.'"><img src="'.$imgurl. '" alt="'.$alt.'" width="'.$im->Get("width"). - '" height="'.$im->Get("height").'" /></a>'; + '" height="'.$im->Get("height").'"'. + (exists $params{class} ? ' class="'.$params{class}.'"' : ''). + (exists $params{id} ? ' id="'.$params{id}.'"' : ''). + ' /></a>'; } #}}} 1 diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 18e28a196..d04bc1d51 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -65,7 +65,7 @@ sub preprocess (@) { #{{{ } } elsif ($key eq 'title') { - $title{$page}=encode_entities($value); + $title{$page}=$value; } elsif ($key eq 'permalink') { $permalink{$page}=$value; |