mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	fix parsing attributes with non-breakable space
This commit is contained in:
		
							parent
							
								
									268910ed3b
								
							
						
					
					
						commit
						3f69a3c572
					
				| @ -311,7 +311,8 @@ export default class AttributeEditorWidget extends TabAwareWidget { | |||||||
| 
 | 
 | ||||||
|     getPreprocessedData() { |     getPreprocessedData() { | ||||||
|         const str = this.textEditor.getData() |         const str = this.textEditor.getData() | ||||||
|             .replace(/<a[^>]+href="(#[A-Za-z0-9/]*)"[^>]*>[^<]*<\/a>/g, "$1"); |             .replace(/<a[^>]+href="(#[A-Za-z0-9/]*)"[^>]*>[^<]*<\/a>/g, "$1") | ||||||
|  |             .replace(/ /g, " "); // otherwise .text() below outputs non-breaking space in unicode
 | ||||||
| 
 | 
 | ||||||
|         return $("<div>").html(str).text(); |         return $("<div>").html(str).text(); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam