# Html encoding

**URL:** <https://legacy-community.ine.com/t/html-encoding/5909>\
**Category:** Web Application Penetration Testing Professional\
**Tags:** red, ewpt\
**Created:** [April 3, 2025, 10:52pm UTC](https://legacy-community.ine.com/t/html-encoding/5909 "2025-04-03T22:52:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibrahim.elhraie-0939](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@ibrahim.elhraie-0939](https://legacy-community.ine.com/u/ibrahim.elhraie-0939)\
**Post date:** [April 3, 2025, 10:52pm UTC](https://legacy-community.ine.com/t/html-encoding/5909/1 "2025-04-03T22:52:04Z")

</div>

Hello community,  
i faced an issue in the last module of encoding, the third video “HTML encoding” whenever i run  
pyton3 -m http.server 80 and create a `file.php` containing `htmlspecialchars()` to test XSS input via the URL, the server **does not process the PHP code**. Instead, when I click on `file.php`, it gets **downloaded** instead of being executed. However, .html files are rendering correctly when accessed.  
what could be causing this issue guys ?

and thanks

---

<div class="post-metadata">

**Author:** ![adel.b.jemaa-08cfbf8](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@adel.b.jemaa-08cfbf8](https://legacy-community.ine.com/u/adel.b.jemaa-08cfbf8)\
**Post date:** [April 7, 2025, 1:09pm UTC](https://legacy-community.ine.com/t/html-encoding/5909/2 "2025-04-07T13:09:11Z")

</div>

Hi ibrahim,  
I think you could use php instead of python module to setup webserver, try with this command:  
php -S 127.0.0.1:80 -t .

---

<div class="post-metadata">

**Author:** ![ibrahim.elhraie-0939](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@ibrahim.elhraie-0939](https://legacy-community.ine.com/u/ibrahim.elhraie-0939)\
**Post date:** [April 7, 2025, 4:26pm UTC](https://legacy-community.ine.com/t/html-encoding/5909/3 "2025-04-07T16:26:04Z")

</div>

thanks it works ! also we can just run apache2 server and try to execute the php file from there 😃
