This commit is contained in:
parent
717c87c715
commit
b3391e2901
|
|
@ -174,7 +174,7 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-10">
|
||||
<textarea class="form-control" rows="3" id="base64_text"></textarea>
|
||||
<textarea class="form-control" rows="3" id="base64_text" style="font-family: monospace, monospace;"></textarea>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button class="btn btn-info" onClick="return convert_base64();">Przelicz</button>
|
||||
|
|
@ -357,9 +357,9 @@
|
|||
|
||||
function convert_base64() {
|
||||
if ($('input[name=base64RadioOptions]:checked').val() == "text") {
|
||||
$('#base64_output').html(window.btoa($('#base64_text').val()));
|
||||
$('#base64_output').html(window.btoa(unescape(encodeURIComponent($('#base64_text').val()))));
|
||||
} else {
|
||||
$('#base64_output').html(window.atob($('#base64_text').val()));
|
||||
$('#base64_output').html(decodeURIComponent(escape(window.atob($('#base64_text').val()))));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue