encode image_tag as utf8 in [x]html export #1165

Merged
merged 1 commit into from Dec 16, 2011

Conversation

Projects
None yet
2 participants
@minrk
Member

minrk commented Dec 16, 2011

Should only affect Python 2

Also removes redundant 'setDefaultButton' in Inline/External dialog, which caused strange display of the two buttons.

closes #1164

encode image_tag as utf8 in [x]html export
Should only affect Python 2

also removes redundant 'setDefaultButton' in Inline/External dialog,
which caused strange display of the two buttons.
+ if isinstance(s, unicode):
+ s = s.encode('utf8')
+ return s
+ return utf8_image_tag

This comment has been minimized.

@fperez

fperez Dec 16, 2011

Member

Why are you returning the function here? I think it should instead read

return utf8_image_tag(image_tag)
@fperez

fperez Dec 16, 2011

Member

Why are you returning the function here? I think it should instead read

return utf8_image_tag(image_tag)

This comment has been minimized.

@minrk

minrk Dec 16, 2011

Member

image_tag is a callable, so the wrapped function must also be a callable (it's a decorator).

@minrk

minrk Dec 16, 2011

Member

image_tag is a callable, so the wrapped function must also be a callable (it's a decorator).

This comment has been minimized.

@fperez

fperez Dec 16, 2011

Member

Ah, got it. I didn't realize it was being used as a decorator, I mistakenly thought image_tag was a string.

@fperez

fperez Dec 16, 2011

Member

Ah, got it. I didn't realize it was being used as a decorator, I mistakenly thought image_tag was a string.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Dec 16, 2011

Member

OK, code looks otherwise good. I checked previously failing situations now work correctly. Thanks!

Merging now.

Member

fperez commented Dec 16, 2011

OK, code looks otherwise good. I checked previously failing situations now work correctly. Thanks!

Merging now.

@fperez fperez closed this Dec 16, 2011

fperez added a commit that referenced this pull request Dec 16, 2011

Merge pull request #1165 from minrk/save
encode image_tag as utf8 in [x]html export

Should only affect Python 2
    
Also removes redundant 'setDefaultButton' in Inline/External dialog, which caused strange display of the two buttons.

closes #1164

@fperez fperez merged commit 376addf into ipython:master Dec 16, 2011

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Merge pull request #1165 from minrk/save
encode image_tag as utf8 in [x]html export

Should only affect Python 2
    
Also removes redundant 'setDefaultButton' in Inline/External dialog, which caused strange display of the two buttons.

closes #1164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment