HTML getting rendered in the response field
See original GitHub issueWhat you did:
Add this HTML snippet inside the response field. And you will see it render…
<div style='width: 500px; background-color: red;'>Hey you!</div>
What happened:
It rendered the HTML
Suggested solution:
I think at the moment mockit will only return JSON responses. It would be nice that HTML does not get rendered as HTML, but also maybe give the user an error if HTML was added?
Option 2: We can try and support HTML as responses but not sure what would be involved.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Rendering HTML Pages as an HTTP Server Response ...
We can use the same server to render HTML elements as the server response instead of sending plain text. Here is a list...
Read more >Rendering html response from API in React
1. Store the html in a useState field after receiving it, and use a useEffect callback to send the request. Currently you're sending...
Read more >How to render HTML output in hook_ENTITY_TYPE_presave()
So, I want to get the rendered output of the field after running the input filter and save it to the field text_main_display....
Read more >How browser rendering works — behind the scenes
The purpose of this article is to explain, in very simple terms, the steps your browser takes to convert HTML, CSS, and JavaScript...
Read more >Populating the page: how browsers work - Web performance
We describe five steps in the critical rendering path. The first step is processing the HTML markup and building the DOM tree. HTML...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @samrith-s
@boyney123 left out the
--build
flag i mentioned in my PR some time ago - that forces docker compose to rebuild the images and consequently updates the code 😃but hot reloading is also possible by mounting the code from your workstation into the container
looking at the Dockerfile, you should be able to just mount the whole directory into each WORKDIR, so something like this could work… but is untested
by mounting the whole directory instead of just the routes.json, the used routes json changes from src/config/routes.json to ./configuration/routes.json
ps: feel free to ping me if you have any questions about docker/docker-compose @boyney123, i do have some experience on the topic 😃
Thanks for this @wohlben and helping out. I’m going to raise some docs about how people can contribute and get the whole environment setup as I realise it might be the easiest thing to get up and running (to work on)