🐛 Fix bug that HTML did get rendered in JSON view

This commit is contained in:
Jan Oberhauser 2020-12-24 22:09:07 +01:00
parent 44c28b3491
commit 065937a39c

View file

@ -130,7 +130,6 @@
path="" path=""
:highlightSelectedNode="true" :highlightSelectedNode="true"
:selectOnClickNode="true" :selectOnClickNode="true"
:custom-value-formatter="customLinkFormatter"
@click="dataItemClicked" @click="dataItemClicked"
class="json-data" class="json-data"
/> />
@ -418,13 +417,6 @@ export default mixins(
this.binaryDataDisplayVisible = false; this.binaryDataDisplayVisible = false;
this.binaryDataDisplayData = null; this.binaryDataDisplayData = null;
}, },
customLinkFormatter (data: object | number | string, key: string, parent: object, defaultFormatted: () => string) {
if (typeof data === 'string' && data.startsWith('http://')) {
return `<a style="color:red;" href="${data}" target="_blank">"${data}"</a>`;
} else {
return defaultFormatted;
}
},
convertToJson (inputData: INodeExecutionData[]): IDataObject[] { convertToJson (inputData: INodeExecutionData[]): IDataObject[] {
const returnData: IDataObject[] = []; const returnData: IDataObject[] = [];
inputData.forEach((data) => { inputData.forEach((data) => {