From: Christopher H. <ch...@ch...> - 2005-02-28 18:17:58
|
On Fri, 25 Feb 2005, Sam Tregar wrote: > Are you sure you're not on crach? Positive. Something else may be causing some confusion, but several sober persons have looked at the same thing and scratched their noggins. > That sounds highly suspicious. Absolutely. > HTML::Template doesn't parse the HTML of the template at all, so this > kind of thing is almost impossible. Something is breaking this (example below). > However, I can think of another reason why this might not be working. > URLs in Krang are passed through Krang::Widget::format_url which breaks > them up into chunks separated by <br> tags. This is needed to keep long > URLs from breaking the UI. Hmmm. Would this cause that? this line of code in workspace.tmpl: (Note the variable tag in the title attribute. Reformatted to fit in 72 columns.) <tmpl_if is_story><a title="<tmpl_var url>" href="javascript:preview_story('<tmpl_var story_id>')"><b><tmpl_var title></b></a></tmpl_if> produces this line of html in the browser (also reformatted onto multiple lines): <a title="'<a href="javascript:preview_story(46)>tvhj.fini.net/AppDev/Linux</a>'" href="javascript:preview_story('46')"><b>Linux Is A Powerful Operating System</b></a> If the "tmpl_var url" tag is not inside an HTML tag it interpolates normally. But if its inside an HTML tag it does wacky stuff as show in the previous HTML snippet. We tried the same thing in several different places in workspace.tmpl. In every case once the "tmpl_var url" tag was moved inside the HTML tag it started substituting the first part of the tag over again. This broke similarly regardless of whether it was an A tag or an INPUT tag. (Incidentally my template designer in this case is my wife and she was very miffed that she couldn't make this "mouseover show the URL" piece work to finish her workspace redo. Now she has to click into the story from the workspace to find the site/URL.) -- </chris> "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) |