streetwriters / notesnook

A fully open source & end-to-end encrypted note taking alternative to Evernote.
https://notesnook.com/
GNU General Public License v3.0
9.74k stars 595 forks source link

Importer - Import from Evernote using ENEX File Results in Blank Code Blocks where HTML is used #2064

Closed streetwriters[bot] closed 1 year ago

streetwriters[bot] commented 1 year ago

To reproduce:

  1. Create Evernote note(s) containing code blocks of HTML
  2. Use Notesnook importer to convert ENEX to Zip
  3. Import Zip to Notesnook
  4. Code blocks previously containing HTML in Evernote are blank in NN

Device information: App version: 2.4.4-8e5d931-desktop OS: OS X 10.15.7 Browser: Electron 21.1.1 Pro: true

jordanhandy commented 1 year ago

An edit to this,

It looks like standard HTML works most of the time. Where it seems to fail is when we have custom HTML tags

In my case the tags are formatted like <aura:page> and </aura:page> and <design:attribute> and </design:attribute> when creating Salesforce Aura components

jordanhandy commented 1 year ago

Example content of one of these code blocks.

Notesnook renders these as appropriately sized code blocks (content "should" be in the large block), but its all blank

<aura:component implements="flexipage:availableForAllPageTypes,lightning:availableForFlowScreens" access="global" >

    <aura:attribute name="formType" type="String" default="customer"/>
    <aura:attribute name="userId" type="String" default=""/>
    <aura:attribute name="productOptionsString" type="String"/>
    <aura:attribute name="productOptions" type="List" default="[]"/>
    <aura:attribute name="severityOptionsString" type="String"/>
    <aura:attribute name="severityOptions" type="List" default="[]"/>
    <aura:attribute name="environmentOptionsString" type="String"/>
    <aura:attribute name="environmentOptions" type="List" default="[]"/>

    <aura:attribute name="productValue" type="String" default=""/>
    <aura:attribute name="environmentValue" type="String" default=""/>
    <aura:attribute name="severityValue" type="String" default=""/>
    <aura:attribute name="subjectValue" type="String" default=""/>
    <aura:attribute name="descriptionValue" type="String" default=""/>

    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>    
    <lightning:messages />
    <lightning:input name="Subject" label="Subject" onchange="{!c.subjectChange}" value="{!v.subjectValue}" required/>
    <lightning:combobox name="Product" label="Product" placeholder="Select Product" options="{!v.productOptions}" value="{!v.productValue}" required /> 
    <lightning:textarea name="Description" label="Description" onchange="{!c.descriptionChange}" value="{!v.descriptionValue}" required/>
</aura:component>
thecodrr commented 1 year ago

Seems like an escaping issue. NN is trying to render the HTML instead of displaying it.