Skip to content

Conversation

@iamlemec
Copy link
Contributor

This allows for much cleaner customization of the output prompt in custom.js, as is currently the case with the input prompt.

@takluyver takluyver added this to the 5.2 milestone Aug 18, 2017
@takluyver
Copy link
Member

Thanks!

We're just trying to make a 5.1 release - I've marked this as 5.2 as it's probably not urgent enough to go in at the last minute. Hopefully we can merge it soon after the release.

};

OutputArea.output_prompt_classical = function(prompt_value) {
return '<bdi>'+i18n.msg.sprintf(i18n.msg._('Out[%d]:'),prompt_value)+'</bdi>';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this construct a node like the old code does, rather than assembling an HTML string? While I don't think there's a security concern here, it's good practice to use the safer style throughout.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, just made the change. Btw, the code for input_prompt_classical in codecell.js also uses an HTML string, so it might be worth changing that too.

@gnestor
Copy link
Contributor

gnestor commented Sep 15, 2017

@iamlemec This looks good to me. I just re-ran the Travis build and it's passing now. @takluyver Is this ready to merge?

@takluyver
Copy link
Member

Yup, I think so.

@iamlemec thanks, and thanks for checking the input prompt method. If you want to make a separate PR to update that to create an element, I think we could merge that.

@takluyver takluyver merged commit 9dabaa2 into jupyter:master Sep 15, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants