Import text/x-template script triggers an invalid output file

Hello,
I am using Aspose.HTML (v. 23.3) for .NET (.NET Framework 4.5.2).
If I try to import an HTML file that contains text/x-template script, the output content is not valid (for example, divoldivdivdivdivadiv tag).

This is an example code:

//load license
Aspose.Html.License htmlLicense = new Aspose.Html.License();
htmlLicense.SetLicense(“Aspose.Total.lic”);

//import file config
Aspose.Html.Configuration htmlConfig = new Aspose.Html.Configuration();
htmlConfig.Security |= Sandbox.Scripts | Sandbox.Images;
  
var doc = new HTMLDocument("error1.html", htmlConfig);
doc.Save("output.html");

This is error1.html content:

<!DOCTYPE html>
<html>
<head>
         <script type="text/x-template" title="share-content-popup">
    <form action="#" method="post" class="aui share-content-popup">
        <div class="field-group">
            <div class="autocomplete-user-target">
                <input class="text autocomplete-sharepage" id="users" data-max="10" data-dropdown-target=".autocomplete-user-target" data-none-message="No matching user or email found" placeholder="User name or email"/>
            </div>
            <ol class="recipients">
            </ol>
        </div>
        <div class="field-group">
            <textarea class="textarea" id="note" placeholder="Add an optional note"/>
        </div>
        <div class="field-group button-panel">
            <div class="progress-messages-icon"></div>
            <div class="progress-messages">
            </div>
            <input class="button submit" type="submit" value="Share" disabled/>
            <a class="close-dialog" href="#">Cancel</a>
        </div>
    </form>
</script>
</head>
<body>

</body>
</html>

This is the output file content(Expected same as input):

<!DOCTYPE html><html><head>
         <script  title="share-content-popup">
    <form action="#" method="post" class="aui share-content-popup">
        <div class="field-group">
            <div class="autocomplete-user-target">
                <input class="text autocomplete-sharepage" id="users" data-max="10" data-dropdown-target=".autocomplete-user-target" data-none-message="No matching user or email found" placeholder="User name or email"/>
            </div>
            <ol class="recipients">
            </divol>
        </divoldiv>
        <div class="field-group">
            <textarea class="textarea" id="note" placeholder="Add an optional note"/>
        </divoldivdiv>
        <div class="field-group button-panel">
            <div class="progress-messages-icon"></divoldivdivdiv>
            <div class="progress-messages">
            </divoldivdivdivdiv>
            <input class="button submit" type="submit" value="Share" disabled/>
            <a class="close-dialog" href="#">Cancel</divoldivdivdivdiva>
        </divoldivdivdivdivadiv>
    </divoldivdivdivdivadivform>
</script>
</head>
<body>


</body></html>

Thanks for your help.

@ork

Can you please try using the latest version of the API i.e. 23.8.1. We used it and got below output HTML:

<!DOCTYPE html><html><head>
         <script type="text/x-template" title="share-content-popup">
    <form action="#" method="post" class="aui share-content-popup">
        <div class="field-group">
            <div class="autocomplete-user-target">
                <input class="text autocomplete-sharepage" id="users" data-max="10" data-dropdown-target=".autocomplete-user-target" data-none-message="No matching user or email found" placeholder="User name or email"/>
            </div>
            <ol class="recipients">
            </ol>
        </div>
        <div class="field-group">
            <textarea class="textarea" id="note" placeholder="Add an optional note"/>
        </div>
        <div class="field-group button-panel">
            <div class="progress-messages-icon"></div>
            <div class="progress-messages">
            </div>
            <input class="button submit" type="submit" value="Share" disabled/>
            <a class="close-dialog" href="#">Cancel</a>
        </div>
    </form>
</script>
</head>
<body>


</body></html>

Thank you for the response.
The last version of the API (23.8.1) is available for .net 2.0 only (correct me if I’m wrong), and our project targets .net Framework 4.5. So we use the last version that supports.NET Framework 4.5.

@ork

We are afraid that we cannot provide a fix or investigate some issues in the older versions of the API. The support is provided on the basis of the latest available version with which we are unable to reproduce the issue. We recommend and suggest you to upgrade the API and .NET Framework version at your end. In case you still have any concerns, please share with us.