Saving file overwrites PHP

======== TEMPLATE BUG FORM ========

Wappler Version : 2.4.5
Operating System : Windows 10

Expected behavior

Saving a file should not change the code

Actual behavior

The small piece of PHP code below is overwritten

How to reproduce

Append a dynamic version string to an image file like this:
<img src="images/image.jpg?v<?php echo filemtime('images/image.jpg');?>">
…and save the file. Wappler rewrites the code like this:
<img src="images/image.jpg?v+++++++++++++++++++++++++++++++++++++++++++">

Is that the only php that you have in the document?

Yes.

A minor update to this issue. I’ve just been making some changes to a very old website. The page I was working on had sections of PHP throughout. Where there were links, they were all changed as shown below, when I pressed Ctrl+S:

Thanks for the update, so from what I understand is that it only gets replaced in the href attribute and other PHP code on the page aren’t affected.

Yes. I’m pretty sure that’s the case. The page I was working on had about 600 lines, most of which was PHP, and only code in the href was replaced - quite extensively in some cases, eg:

Currently we can’t see the inline php code in hrefs and those get auto corrected on save. The best solution for that might be to just add an option to not auto correct links on save…

I’m not sure what ‘auto correct links’ does. Generally, I would prefer things were not changed on save (at least without knowing what was going to be changed).

Obviously it’s not going to be an issue in the future, but at least for the time being it would be good if these changes were not made.

Edit: actually, I suppose it could be an issue in the future. I was thinking the issue is that this site is very old, but I can imagine there could be cases where it’s useful to have PHP in a link.