mind serializer and weblog
[ start | index | login ]
start > source-changed-ImageMacro

source-changed-ImageMacro

Created by case. Last edited by case, 5 years and 171 days ago. Viewed 144 times. #1
[edit] [rdf]
labels
attachments

NOT ACTIVE ANY MORE

Reason

Referring external images did not work, even after updating application.conf

app.perm.externalImages=allow

It showed, that the ImageMacro code is broken, as it searches the indexOf('.') within the image link to locate the extension. The extension is then cut off. Unfortunalty, on www.somewhere.com/image.jpg, the extension was not found correctly and an incorrect html link was produced (http://www.)

Updated org.snipsnap.snip.filter.macro.ImageMacro

public void execute(Writer writer, MacroParameter params)
      throws IllegalArgumentException, IOException {

[...]

// MOVED EXTENSION LOOKUP INTO ELSE if (img.startsWith("http://")) { if (config.allowExternalImages()) { SnipLink.appendExternalImage(buffer, img, align); } } else { // MW CHANGED MOVED EXTENSION DETECTION AFTER HTTP DETECTION // Does the name contain an extension? int dotIndex = img.indexOf('.'); if (-1 != dotIndex) { ext = img.substring(dotIndex + 1); img = img.substring(0, dotIndex); } [...]

no comments | post comment
Quick Links
WhatIsThis about?
Midlets (mobile apps)
TimeLine
Charley a dog's life
MovieReview
Impressum
Project (internal)

Logged in Users: (1)
… and 3 Guests.

< September 2008 >
SunMonTueWedThuFriSat
123456
78910111213
14151617181920
21222324252627
282930

Icon-Snip more changes...

Blogs
>>++ vox.machina ++
>>Zitate - Sprüche - Aphorismen
>>Wil Wheaton
>>Mathematische Kleinigkeiten
>>William Gibson
>>instant-thinking
>>Over heard in NY

nearby  sites
link=http://www.mozilla.org/products/firefox/central.html
link=http://www.nutellausa.com/
link=http://snipsnap.org
link=http://www.amazon.de/exec/obidos/registry/wishlist/ref=cs_nav_top_2/028-7651535-0049343
RSS Feed RSS Feed
post to del.icio.us

Stats: 1176 snips by 16 users
created 5 years and 236 days ago

Powered by
>>SnipSnap 1.0b2-uttoxeter
with SnipScale 1.1.0



This work is licensed under a
>>Creative Commons License.

SEARCH