Remove html formatting in a warn statement. #919
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is a minimal working example to demonstrate the change:
DOCUMENT(); loadMacros('PGstandard.pl'); BEGIN_TEXT \{ foo() \} END_TEXT ENDDOCUMENT();
Also remove the
$PAR
's around the output when these errors occur. This makes the output look more like the code to begin with.With the develop branch the warning messages for this problem will be:
ERROR in old_safe_ev, PGbasicmacros.pl: <PRE>
## There is an error occuring inside evaluation brackets \{ ...code... \}
## somewhere in an EV2 or EV3 or BEGIN_TEXT block.
## Code evaluated:
## foo()
##Undefined subroutine &main::foo called at line 1 of (eval 7649).
##</PRE><BR>
at line 2080 of [PG]/macros/core/PGbasicmacros.pl.
Since these warnings are now xml escaped by webwork2 the html formatting no longer works.
With this branch they will be:
There is an error occuring inside evaluation brackets \{ ...code... \}
somewhere in an EV2, EV3, or BEGIN_TEXT block.
Code evaluated:
foo()
Errors:
Undefined subroutine &main::foo called at line 1 of (eval 7742).
I don't think that the "ERROR in old_safe_ev, PGbasicmacros.pl" part is useful for problem authors, so that was dropped.
Also remove the
;
from the end of the eval, and the comment about it. Testing shows that comment is false.