mirror of
				https://github.com/Fabio286/antares.git
				synced 2025-06-05 21:59:22 +02:00 
			
		
		
		
	fix: html tags searching in history or saved queries, fixes #847
This commit is contained in:
		| @@ -75,7 +75,7 @@ | ||||
|                                     <code | ||||
|                                        class="cut-text" | ||||
|                                        :title="query.sql" | ||||
|                                        v-html="highlight(highlightWord(query.sql), {html: true})" | ||||
|                                        v-html="highlight(query.sql, {html: true})" | ||||
|                                     /> | ||||
|                                  </div> | ||||
|                                  <div class="tile-bottom-content"> | ||||
| @@ -210,17 +210,6 @@ const resizeResults = () => { | ||||
| const refreshScroller = () => resizeResults(); | ||||
| const closeModal = () => emit('close'); | ||||
|  | ||||
| const highlightWord = (string: string) => { | ||||
|    string = string.replaceAll('<', '<').replaceAll('>', '>'); | ||||
|  | ||||
|    if (searchTerm.value) { | ||||
|       const regexp = new RegExp(`(${searchTerm.value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})`, 'gi'); | ||||
|       return string.replace(regexp, '<span class="text-primary text-bold">$1</span>'); | ||||
|    } | ||||
|    else | ||||
|       return string; | ||||
| }; | ||||
|  | ||||
| const onKey = (e: KeyboardEvent) => { | ||||
|    e.stopPropagation(); | ||||
|    if (e.key === 'Escape') | ||||
|   | ||||
| @@ -32,7 +32,7 @@ | ||||
|                v-if="note.type === 'query'" | ||||
|                ref="noteParagraph" | ||||
|                class="tile-paragraph sql" | ||||
|                v-html="highlight(highlightWord(note.note), {html: true})" | ||||
|                v-html="highlight(note.note, {html: true})" | ||||
|             /> | ||||
|             <div | ||||
|                v-else | ||||
|   | ||||
		Reference in New Issue
	
	Block a user