fix internal links showing up as external (#3128)
* fix internal links showing up as external * fix internal links showing up as external
This commit is contained in:
		
							parent
							
								
									2d9a5db967
								
							
						
					
					
						commit
						4e6020b88c
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -158,7 +158,12 @@ export function linkRequiresWarning(uri: string, label: string) { | ||||||
|   const host = urip.hostname.toLowerCase() |   const host = urip.hostname.toLowerCase() | ||||||
| 
 | 
 | ||||||
|   // Hosts that end with bsky.app or bsky.social should be trusted by default.
 |   // Hosts that end with bsky.app or bsky.social should be trusted by default.
 | ||||||
|   if (host.endsWith('bsky.app') || host.endsWith('bsky.social')) { |   if ( | ||||||
|  |     uri.startsWith('/') || | ||||||
|  |     host.endsWith('bsky.app') || | ||||||
|  |     host.endsWith('bsky.social') || | ||||||
|  |     host.endsWith('blueskyweb.xyz') | ||||||
|  |   ) { | ||||||
|     // if this is a link to internal content,
 |     // if this is a link to internal content,
 | ||||||
|     // warn if it represents itself as a URL to another app
 |     // warn if it represents itself as a URL to another app
 | ||||||
|     return !!labelDomain && labelDomain !== host && isPossiblyAUrl(labelDomain) |     return !!labelDomain && labelDomain !== host && isPossiblyAUrl(labelDomain) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue