HTML Node - Include Target element HTML

The idea is:

With the HTML Node, when you return HTML for a selector match, the return values do not include the matched element, only it’s children.

I would like to see a new Return Value of ‘HTML with matched element’ that would include the matched element in the output.

My use case:

I’m doing some advanced data matching on scraped webpage and am finding the removal of the parent element is breaking some of my processes.

I think it would be beneficial to add this because:

This will allow for more robust HTML data extraction.

To be more specific with this request, when using the HTML node to return html it returns the InnerHTML of the element, I would like the option to have the OuterHTML returned.

Oh, please! You can always get the child elements via CSS selector (target > *), so there’s no need to use the innerHTML at all. I have this scenario all the time. E.g. "Get all images (<img>) only returns null, when choosing HTML extraction.

I am fairly certain this is an incredibly easy change in the code.

In the HtmlExtract node, there is this line 29:

html: ($: Cheerio, _valueData: IValueData): string | undefined => $.html() || undefined,

my understanding is, you would only need to change $.html() to $.toString() to receive the outer HTML instead of the inner HTML.

As I seem to be too dumb to get the HtmlExtract node working on my local developer instance, thus not being able to test this out, maybe someone with a working dev environment could chime in and test this theory?