Handle hashtags
--HG-- extra : rebase_source : 6f3b4f27a7e7243da9b078de5f89c137b21d8fbd
This commit is contained in:
		
							parent
							
								
									3b50b96d83
								
							
						
					
					
						commit
						a42e24cba3
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -37,9 +37,14 @@ try { | ||||||
|         if (preg_match ("/^#/", $path)) { |         if (preg_match ("/^#/", $path)) { | ||||||
|             return $path; |             return $path; | ||||||
|         } |         } | ||||||
|  |         $hash = ""; | ||||||
|  |         if (preg_match ("/^(.+)#(.+)$/", $path, $matches)) { | ||||||
|  |             $path = $matches [1]; | ||||||
|  |             $hash = "#" . $matches [2]; | ||||||
|  |         } | ||||||
|         $comp = $book->getComponentName ($component, $path); |         $comp = $book->getComponentName ($component, $path); | ||||||
|         if (!$comp) return "#"; |         if (!$comp) return "#"; | ||||||
|         return "$method'epubfs.php?{$add}comp=$comp'"; |         return "$method'epubfs.php?{$add}comp={$comp}{$hash}'"; | ||||||
|     }; |     }; | ||||||
|      |      | ||||||
|     $data = preg_replace_callback ("/(src=)[\"']([^:]*?)[\"']/", $callback, $data); |     $data = preg_replace_callback ("/(src=)[\"']([^:]*?)[\"']/", $callback, $data); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue