-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
PHP code being removed and nav bar being duplicated #390
Comments
If The php code is probably stripped by the browser, you can log If you wish to keep php code in the page (not recommended) you can use something like |
I assume it is because when the page loads in the editor, PHP is executed and the output is HTML. Take a simple variable declaration
If the suggested approach is not recommended, how can I retain the PHP code within my files? |
You should use a template system like twig or blade, with php the user can insert any code and you expose your app to arbitrary code execution. I use Vtpl https://github.com/givanz/vtpl myself inside Vvveb CMS https://github.com/givanz/Vvveb for pages edited by VvvebJs. Vtpl uses html attributes for templating it does not use a template language and it was designed to be used for such cases where the html can be safely edited by page builders or html editors. If you still wish to use php convert/replace php |
This may seem like two issues but they're both related to the save function.
My HTML files are actually PHP files. These files contain include statements to get headers, footers, global elements etc.
When I save the file, even with ALLOW PHP set to true, the saving method strips away all the PHP code.
Also when saving, the nav bar seems to be replicated outside the header section. Sample code below.
The text was updated successfully, but these errors were encountered: