forked from vilmibm/tilde-train
		
	Escape HTML characters when printing the train
Since it's wrapped in a `<pre>`, I assume it's meant to be inserted into HTML?
This commit is contained in:
		
							parent
							
								
									0b53c462de
								
							
						
					
					
						commit
						6063c8b3b3
					
				| @ -41,6 +41,7 @@ import curses | ||||
| from signal import signal, SIGINT | ||||
| import time # allowing the loop steps of train animation to be slowed | ||||
| import string # for input validation | ||||
| from html import escape | ||||
| from inspect import cleandoc | ||||
| from pathlib import Path | ||||
| 
 | ||||
| @ -339,7 +340,7 @@ train_str = "\n".join(train) | ||||
| 
 | ||||
| if print_train: | ||||
|   print("<pre>") | ||||
|   print(train_str) | ||||
|   print(escape(train_str)) | ||||
|   print("</pre>") | ||||
|   sys.exit() | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user