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

notebook stores HTML escaped text in the file #1205

Closed
minrk opened this issue Dec 24, 2011 · 2 comments · Fixed by #1206
Closed

notebook stores HTML escaped text in the file #1205

minrk opened this issue Dec 24, 2011 · 2 comments · Fixed by #1206
Milestone

Comments

@minrk
Copy link
Member

minrk commented Dec 24, 2011

The notebook frontend escapes various plaintext things for HTML output, but it shouldn't save the transformed versions to files, which it does currently.

This code:

In [1]: u'hi'
Out[1]: u'hi'

In []: |

Is stored in the ipynb as:

    {
     "cell_type": "code", 
     "collapsed": false, 
     "input": [
      "u'hi'"
     ], 
     "language": "python", 
     "outputs": [
      {
       "output_type": "pyout", 
       "prompt_number": 1, 
       "text": [
        "u'hi'"
       ]
      }
     ], 
     "prompt_number": 1
    }, 
    {
     "cell_type": "code", 
     "collapsed": true, 
     "input": [], 
     "language": "python", 
     "outputs": [], 
     "prompt_number": " "
    }

There should be zero html escapes in .ipynb files outside explicit HTML fields.

@minrk
Copy link
Member Author

minrk commented Dec 24, 2011

The issue appears to be the use of utils.fixConsole when handling output. We clobber the actual data with the html-escaped version, which we shouldn't do. We should preserve the original, and never persist the escaped version.

@ellisonbg
Copy link
Member

This is now fixed.

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

Successfully merging a pull request may close this issue.

2 participants