jquery .html()

jquery .html()

I have a string with html element that i will use jquery function .html() to put in html page.
so after using .html(), i see an error like, it is supposed to be <button class="btn btn-primary" onclick="chooseSoalUjian('1','ulangan harian')">Choose</button>, but it turned out to be <button class="btn btn-primary" onclick="chooseSoalUjian('1','ulangan" harian')>Choose</button>... see the error at ulangan