Changed the way the comment is handled :
* If the comment is HTML just replace <br> -> </br /> * Else adapt the comment to html Should fix #2
This commit is contained in:
		
							parent
							
								
									9cac9980c1
								
							
						
					
					
						commit
						cd6bf1c1cf
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		
							
								
								
									
										9
									
								
								book.php
									
										
									
									
									
								
							
							
						
						
									
										9
									
								
								book.php
									
										
									
									
									
								
							|  | @ -123,7 +123,14 @@ class Book extends Base { | ||||||
|         if (!is_null ($se)) { |         if (!is_null ($se)) { | ||||||
|             $addition = $addition . "<strong>" . localize("content.series") . "</strong>" . str_format (localize ("content.series.data"), $this->seriesIndex, $se->name) . "<br />\n"; |             $addition = $addition . "<strong>" . localize("content.series") . "</strong>" . str_format (localize ("content.series.data"), $this->seriesIndex, $se->name) . "<br />\n"; | ||||||
|         } |         } | ||||||
|         return $addition . strip_tags ($this->comment, '<div>'); |         if (preg_match ("/<\/(div|p)>/", $this->comment)) | ||||||
|  |         { | ||||||
|  |             return $addition . str_replace ("<br>", "<br />", $this->comment); | ||||||
|  |         } | ||||||
|  |         else | ||||||
|  |         { | ||||||
|  |             return $addition . htmlspecialchars ($this->comment); | ||||||
|  |         } | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     public function getFilePath ($extension, $relative = false) |     public function getFilePath ($extension, $relative = false) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue