# Html code window fail rendering with php code inside

**URL:** <https://forum.pinegrow.com/t/html-code-window-fail-rendering-with-php-code-inside/2031>\
**Category:** Bug Reports\
**Tags:** bug\
**Created:** [July 5, 2018, 2:33pm UTC](https://forum.pinegrow.com/t/html-code-window-fail-rendering-with-php-code-inside/2031 "2018-07-05T14:33:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![micheleSaltori](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/michelesaltori/32/1146_2.png) [@micheleSaltori](https://forum.pinegrow.com/u/micheleSaltori)\
**Post date:** [July 5, 2018, 2:33pm UTC](https://forum.pinegrow.com/t/html-code-window-fail-rendering-with-php-code-inside/2031/1 "2018-07-05T14:33:34Z")

</div>

Not always … sometimes … I did not understand under what conditions…

Code editor display an corrupted source-code, there are trucated from after doctype tag to first occurence of an php script tag.

See following my real code:

**My original code:**

```auto
<?php
//require_once ('security_access.inc.php');
require_once ('security_access_anonym.inc.php');
?>
<!doctype html>
<html lang="it" data-pgc-master="SecMaster.php">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
...
  <hr class="pt-2 pb-2 "/>
            <div class="container-fluid w-75 mt-3">
                <div class="alert alert-danger <?=empty ($_SESSION['parameters']['message']) ? "d-none" : "";?>">
                    <strong><?=!empty($_SESSION['parameters']['message']) ? "Attenzione!" : "";?></strong>&nbsp;
                   <?=!empty($_SESSION['parameters']['message']) ? $_SESSION['parameters']['message'] : "";?>
                </div>
                <form role="form" action="security_login.php" method="post" class="was-validated">
                    <div class="form-group">

```

**Resulting damaged code in window code editor from start of file:**

```auto
<!doctype: "";
<php: "";</php>
                </div>
                <form role="form" action="security_login.php" method="post" class="was-validated" target="_pg_blank" data-pg-id="407">
                    <div class="form-group" data-pg-id="408">
...followed by rest of file...

```

Note that if I save the file, page are not corrupted and reopen it is intact.

_I’m using: PG 4.8 on Linux Mint LMDE 2 Cinnamon 64-bit, Apache2, PHP 5.6.36_
