Just another bunch of stuff pouring out of some guy's head

Nuke ‘Em!

Fixed my first bug last Thursday. Didn’t write about it then because I couldn’t be buggered (no pun intended).

Seems DNN3’s skin and container preview thumbnails weren’t displaying in its admin interface. Unbelievably the <img src= URL had back slashes in it. On my W2K -> W2K3 server URLScan was blocking this.

Here’s the fix:

In the ProcessSkins() and ProcessContainers() functions (found in: admin\Skins\EditSkins.ascx.vb) is where the <img> tag is built so I’ve made the edit there to avoid screwing up anything else.

Find this part of the appropriate lines:
CreateThumbnail(strFile.Replace(“.ascx”, “.jpg”))

And replace it with this:
Replace(CreateThumbnail(strFile.Replace(“.ascx”, “.jpg”)), “\”, “/”)

It’s simply a Replace() function that finds all the backslashes “\” and replaces ’em with forward slashes “/”.

The reason it works for everyone else is because both IE and FF are working in quirks mode (judging by just the invalid doctype declaration < !DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>), ie. they’ll acccept any old sh!t HTML you throw at them, and they’re both smart enough to figure out that the backslashes are in fact meant to be forward slashes.


Leave a comment

Line and paragraph breaks automatic, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


(required, never displayed)

Before you please complete the CAPTCHA below.

Time limit is exhausted. Please reload the CAPTCHA.

Apologies for the CAPTCHA but the SPAM was killing the site. I was getting hundreds each day.