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

A little worried(; · ∀ ·) #5

Open
HiroyukiNIshimura opened this issue May 7, 2014 · 3 comments
Open

A little worried(; · ∀ ·) #5

HiroyukiNIshimura opened this issue May 7, 2014 · 3 comments

Comments

@HiroyukiNIshimura
Copy link

Although I am allowed to use because it is very favorite.

But ...

<script> alert ('xss') </ script>
... From being able to run the script such as it's the OK?

@HiroyukiNIshimura
Copy link
Author

var preview = this.element.find('.rendered-markdown');

if (setting.xssok) {
    this.markdown = this.editor.getValue();
}
else {
    var stack = $('<div></div>').text(this.editor.getValue());
    this.markdown = $(stack).html();
}
this.html = this.converter.makeHtml(this.markdown);

@HiroyukiNIshimura
Copy link
Author

Decent little more ideas :-)

$.widget( "b4m.ghostDown", {
    editor: null,
    markdown: null,
    html: null,
    converter: null,
    options: {
        tagRejections : null
    },
var preview = this.element.find('.rendered-markdown');
var dummy = $('<div></div>');

this.markdown = this.editor.getValue();
dummy.html(this.converter.makeHtml(this.markdown));
if (this.options.tagRejections) {
    dummy.find(this.options.tagRejections).remove();
}
this.html = dummy.html();
preview.html(this.html);

$('.editor').ghostDown({ tagRejections: 'script foo bar' });

@lenisko
Copy link

lenisko commented Sep 16, 2015

so... it's not committed yet?

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

2 participants