Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to HTML is causing nested </div> to get converted to their HTML Entities #13642

Open
blglenn-sec opened this issue Apr 19, 2022 · 0 comments

Comments

@blglenn-sec
Copy link

blglenn-sec commented Apr 19, 2022

I currently have an ipynb from my wife (in a bootcamp) that has a bunch of Nested

for alerts/marking of assignments. When trying to export it as an HTML however, the formatting gets messed up fairly significantly. I looked at the file itself and the HTML and I noticed the following.

Here is the snipped section that is having the first set of issues:

  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "    \n",
    "**Hello! I am Larchenko Ksenia and I'm glad to review your project**!\n",
    "    \n",
    "    \n",
    "You can find my comments in green, yellow and red boxes like these:\n",
    "\n",
    "\n",
    "<div class=\"alert alert-success\" >\n",
    "    \n",
    "    \n",
    "**Success:**  green color shows that everything is done perfectly;\n",
    "    \n",
    "</div>\n",
    "\n",
    "<div class=\"alert alert-warning\" >\n",
    "    \n",
    "    \n",
    "**Remark & Recommendation:** yellow color highlights something to pay attention for;\n",
    "    \n",
    "</div>\n",
    "\n",
    "\n",
    "\n",
    "<div class=\"alert alert-danger\" >\n",
    "    \n",
    "    \n",
    "**Needs fixing:**  if the color is red, please rework. \n",
    "    \n",
    "</div>\n",
    "\n",
    "\n",
    "<div class=\"alert alert-success\" >\n",
    "    \n",
    "    \n",
    "**Please, don't remove my comments:)**\n",
    "    \n",
    "</div>\n"
   ]
  }

When Exported, the HTML portion looks like this

<p><strong>Hello! I am Larchenko Ksenia and I'm glad to review your project</strong>!</p>
<p>You can find my comments in green, yellow and red boxes like these:
&lt;/div&gt;</p>
<div class="alert alert-success" >


<p><strong>Success:</strong>  green color shows that everything is done perfectly;</p>
<p>&lt;/div&gt;</p>
<div class="alert alert-warning" >


<p><strong>Remark &amp; Recommendation:</strong> yellow color highlights something to pay attention for;</p>
<p>&lt;/div&gt;</p>
<div class="alert alert-danger" >


<p><strong>Needs fixing:</strong>  if the color is red, please rework.</p>
<p>&lt;/div&gt;</p>
<div class="alert alert-success" >


<p><strong>Please, don't remove my comments:)</strong></p>
<p>&lt;/div&gt;</p>

Almost all of the </div> have been converted to the entity of &lt; and &gt;

Here is an image of the Notebook vs the export HTML
https://imgur.com/a/oMm6CMz

I can provide a notebook file if needed, but would prefer to not post it publicly as it has information regarding my wife on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant