Nuke ‘Em!
Filed Under: Programming;Technical;Work
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.
Comments
No Comments so far
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>
Apologies for the CAPTCHA but the SPAM was killing the site. I was getting hundreds each day.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.