Fix double-escaping pointed out by Shish <3
This commit is contained in:
		
							parent
							
								
									9484c9173c
								
							
						
					
					
						commit
						a83c460b70
					
				| @ -127,12 +127,12 @@ class TagCategories extends Extension | |||||||
|         return $tc_keyed_dict; |         return $tc_keyed_dict; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public function getTagHtml(string $tag, $tag_category_dict, string $extra_text = '') |     public function getTagHtml(string $h_tag, $tag_category_dict, string $extra_text = '') | ||||||
|     { |     { | ||||||
|         $h_tag_no_underscores = str_replace("_", " ", $tag); |         $h_tag_no_underscores = str_replace("_", " ", $h_tag); | ||||||
| 
 | 
 | ||||||
|         // we found a tag, see if it's valid!
 |         // we found a tag, see if it's valid!
 | ||||||
|         $h_tag_split = explode(':', $tag, 2); |         $h_tag_split = explode(':', $h_tag, 2); | ||||||
|         if ((count($h_tag_split) > 1) and array_key_exists($h_tag_split[0], $tag_category_dict)) { |         if ((count($h_tag_split) > 1) and array_key_exists($h_tag_split[0], $tag_category_dict)) { | ||||||
|             $category = $h_tag_split[0]; |             $category = $h_tag_split[0]; | ||||||
|             $h_tag = $h_tag_split[1]; |             $h_tag = $h_tag_split[1]; | ||||||
|  | |||||||
| @ -301,7 +301,7 @@ class TagList extends Extension | |||||||
|             } |             } | ||||||
|             $h_tag_no_underscores = str_replace("_", " ", $h_tag); |             $h_tag_no_underscores = str_replace("_", " ", $h_tag); | ||||||
|             if (class_exists('TagCategories')) { |             if (class_exists('TagCategories')) { | ||||||
|                 $h_tag_no_underscores = $this->tagcategories->getTagHtml(html_escape($h_tag), $tag_category_dict); |                 $h_tag_no_underscores = $this->tagcategories->getTagHtml($h_tag, $tag_category_dict); | ||||||
|             } |             } | ||||||
|             $html .= " <a style='font-size: ${size}em' href='$link'>$h_tag_no_underscores</a> \n"; |             $html .= " <a style='font-size: ${size}em' href='$link'>$h_tag_no_underscores</a> \n"; | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user