Skip to content

Commit

Permalink
bugfix with html special chars in pagebuilder code editor
Browse files Browse the repository at this point in the history
  • Loading branch information
KarelBrijs committed Jan 8, 2020
1 parent 9b6f51e commit edc23e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/views/backend/pages/pagebuilder/core.blade.php
Expand Up @@ -155,7 +155,7 @@
</div> --}}
<div class="pageblock_body" id="pageblock_body_{{ $pageblock['id'] }}" data-pbid="{{ $pageblock['id'] }}">{!! $pageblock['body'] !!}</div>
<div class="pageblock_body_raw" id="pageblock_body_raw_{{ $pageblock['id'] }}" data-pbid="{{ $pageblock['id'] }}">{!! $pageblock['raw'] !!}</div>
<div class="pageblock_body_code" id="pageblock_body_code_{{ $pageblock['id'] }}" data-pbid="{{ $pageblock['id'] }}">{{ $pageblock['raw'] }}</div>
<div class="pageblock_body_code" id="pageblock_body_code_{{ $pageblock['id'] }}" data-pbid="{{ $pageblock['id'] }}">{{ htmlspecialchars_decode($pageblock['raw']) }}</div>
</div>
@endforeach
@endif
Expand Down
4 changes: 2 additions & 2 deletions src/views/backend/pages/pagebuilder/index.blade.php
Expand Up @@ -911,9 +911,9 @@ function findInObject(object, property, value) {
event.preventDefault();
//iframe.find('.pb_control_save_code').removeClass('not_shown');
//iframe.find('.pb_control_save').addClass('not_shown');
var pb_html_old = iframe.find('#pageblock_body_code_'+pb_id).html();
var pb_html_old = iframe.find('#pageblock_body_code_'+pb_id).text();
var pb_html = pb_html_old.replace(/&lt;/g, '<').replace(/&gt;/g, '>');
//console.log('the pb html : ', pb_html);
console.log('the pb html : ', pb_html);
//iframe.find('#pageblock_body_'+pb_id).addClass('not_shown');
//iframe.find('#ace_editor_'+pb_id).removeClass('ace_editor_height_null');
//iframe.find('#ace_editor_'+pb_id).addClass('ace_editor_height_full');
Expand Down

0 comments on commit edc23e8

Please sign in to comment.