mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-11 00:31:31 -04:00
[#181] fix search result data-name issues ( purging html only for data-name attribute, update op-list checkmarks accordingly )
This commit is contained in:
parent
bc93969d4b
commit
c6cc998100
4 changed files with 7 additions and 6 deletions
|
@ -46,8 +46,11 @@ class HTMLOperation {
|
|||
* @returns {string}
|
||||
*/
|
||||
toStubHtml(removeIcon) {
|
||||
console.log("toStubHtml ==>",this.name);
|
||||
let html = `<li data-name="${this.name}" class="operation"`;
|
||||
// this.name is pollute with HTML if it originates from search-results, so before
|
||||
// returning the HTML we purge this.name from any HTML for the data-name attribute
|
||||
const name = this.name.replace(/(<([^>]+)>)/ig, "");
|
||||
|
||||
let html = `<li data-name="${name}" class="operation"`;
|
||||
|
||||
if (this.description) {
|
||||
const infoLink = this.infoURL ? `<hr>${titleFromWikiLink(this.infoURL)}` : "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue