mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 06:02:26 -05:00 
			
		
		
		
	[chore] Fix rel="nofollow" so that it only applies to external links (#991)
Resolves https://github.com/superseriousbusiness/gotosocial/issues/990
This commit is contained in:
		
					parent
					
						
							
								076680a199
							
						
					
				
			
			
				commit
				
					
						53a1e47791
					
				
			
		
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -33,7 +33,8 @@ import ( | |||
| // Source: https://github.com/microcosm-cc/bluemonday#usage | ||||
| var regular *bluemonday.Policy = bluemonday.UGCPolicy(). | ||||
| 	RequireNoReferrerOnLinks(true). | ||||
| 	RequireNoFollowOnLinks(true). | ||||
| 	RequireNoFollowOnLinks(false).              // remove the global default which adds rel="nofollow" to all links including local relative | ||||
| 	RequireNoFollowOnFullyQualifiedLinks(true). // add rel="nofollow" on all external links | ||||
| 	RequireCrossOriginAnonymous(true). | ||||
| 	AddTargetBlankToFullyQualifiedLinks(true). | ||||
| 	AllowAttrs("class", "href", "rel").OnElements("a"). | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue