From: Samuel H. <sh...@ma...> - 2005-01-15 19:51:10
|
On Sat, 15 Jan 2005, Mike Gage via activitymail wrote: > Commented out escapeHTML() of warning messages since it prevented > using tables when outputing info about answer evaluators. > > Can someone tell me whether there is another reason why not allowing > HTML in warning messages is or would be important? If so we can > figure out another way to debug answer evaluators. The intent is not to prohibit HTML in warning messages but to allow the literal display of characters like '<' and '&' in warnings. It's going to be a problem if we need to pass HTML through the warning facility, since there would be no way for the warning handler to differentiate between a warning that just happened to use characters like '<' and '&' (say, generated by Perl), and a warning that has purposeful HTML in it that ought to be passed through unmolested. -sam |
From: Michael G. <ga...@ma...> - 2005-01-15 22:14:51
|
I'm not sure how to resolve this. We use "warn" routinely inside problems to help write and debug problems. pretty_print_rh formats complicated structures in tables. This is very useful and I'd rather not loose it. Hard coded warn messages can have < > manually replaced by < and > but there is a problem if the warn message has a variable. I suppose that the long term solution is to build a protected print or debugging statement within the PG environment that allows us to produce debugging output without using the warm mechanism. For now I'd like to leave it the way it is, with HTML allowed in warn messages, and you have to do your own escape. If this causes too many problems I'll up the priority of finding another method for reporting debugging errors in problems. Take care, Mike On Jan 15, 2005, at 2:51 PM, Samuel Hathaway wrote: > On Sat, 15 Jan 2005, Mike Gage via activitymail wrote: > >> Commented out escapeHTML() of warning messages since it prevented >> using tables when outputing info about answer evaluators. >> >> Can someone tell me whether there is another reason why not allowing >> HTML in warning messages is or would be important? If so we can >> figure out another way to debug answer evaluators. > > The intent is not to prohibit HTML in warning messages but to allow the > literal display of characters like '<' and '&' in warnings. > > It's going to be a problem if we need to pass HTML through the warning > facility, since there would be no way for the warning handler to > differentiate between a warning that just happened to use characters > like > '<' and '&' (say, generated by Perl), and a warning that has purposeful > HTML in it that ought to be passed through unmolested. > -sam > |
From: John J. <jj...@as...> - 2005-01-15 23:19:18
|
Michael Gage wrote: > I'm not sure how to resolve this. We use "warn" routinely inside > problems to > help write and debug problems. pretty_print_rh formats complicated > structures in tables. This is very useful and I'd rather not loose it. > > Hard coded warn messages can have < > manually replaced by < and > > but > there is a problem if the warn message has a variable. Being able to use warn statements from the pg side is useful, but all times I had done it recently didn't work. I higher level webwork error is generated and you don't get the output of the warn. Does it currently work for you? John |
From: Michael G. <ga...@ma...> - 2005-01-16 00:04:40
|
I get the same phenomenon for warnings within problems themselves. Commenting out line 797 in pg/lib/WeBWorK/PG/Translator.pm restores the warning messages from problems. We'll need to look at the whole warning mechanism again. Maybe we can devise some unit tests to make sure existing warning functions don't break when we add others. Can't do that this second though. Take care, Mike On Jan 15, 2005, at 6:20 PM, John Jones wrote: > Michael Gage wrote: > >> I'm not sure how to resolve this. We use "warn" routinely inside >> problems to >> help write and debug problems. pretty_print_rh formats complicated >> structures in tables. This is very useful and I'd rather not loose >> it. >> >> Hard coded warn messages can have < > manually replaced by < and >> > but >> there is a problem if the warn message has a variable. > > Being able to use warn statements from the pg side is useful, but all > times I had done it recently didn't work. I higher level webwork > error is generated and you don't get the output of the warn. Does it > currently work for you? > > John > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > OpenWeBWorK-Devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openwebwork-devel > |