Not sure if this is a bug or a feature request, but basically print will write to the session log, while print_html doesn't.
Generally as a rule, scripts use print_html to print spammy stuff, stuff that you don't really care to see in session log. But sometimes it's still you do want to see, such as when a script prints something informative and decorated that text.
As for what the boolean would represent, we could either introduce the new default behavior of print_html output in session log, and the boolean prevents the text being written to session log.
Or we could have the default behavior to be as it is now, that html is not written to session log and you use the boolean to tell mafia that the string is safe to print to session log.
Now I'd normally argue that the default behavior should definitely be opt-in, that is; The script has to explicitly tell mafia to write to session logs.
However
Changing the default behavior of
Finally, the question if the string written should be stripped html or the raw html. I think it should be stripped html, as session log is generally meant to be readable.
Although this could be controlled by a property?
Generally as a rule, scripts use print_html to print spammy stuff, stuff that you don't really care to see in session log. But sometimes it's still you do want to see, such as when a script prints something informative and decorated that text.
As for what the boolean would represent, we could either introduce the new default behavior of print_html output in session log, and the boolean prevents the text being written to session log.
Or we could have the default behavior to be as it is now, that html is not written to session log and you use the boolean to tell mafia that the string is safe to print to session log.
Now I'd normally argue that the default behavior should definitely be opt-in, that is; The script has to explicitly tell mafia to write to session logs.
However
print
already writes to session logs. Having print_html
differ feels a bit weird.Changing the default behavior of
print
is also a bad idea, as it could potentially break scripts, and would break known behavior.Finally, the question if the string written should be stripped html or the raw html. I think it should be stripped html, as session log is generally meant to be readable.
Although this could be controlled by a property?