Open
Description
The goal
My HTML contains <select>
form controls. The parser extracts the text for every <option>
in the menu. I want it to only extract the control as it's displayed - i.e. the <option selected>
Is there a configuration option that supports this? I can't find one on the docs.
Example:
<div>You have selected:</div>
<select>
<option>A</option>
<option>B</option>
<option selected>C</option>
</select>
Currently this outputs as:
You have selected: A B C
Desired output
You have selected: C
Best attempt
I can try to preprocess the HTML in a DOM parser to remove the other options from the menu prior to handing it to html-to-text
Metadata
Metadata
Assignees
Labels
No labels