boyney123 / boyney123/mockit

HTML getting rendered in the response field

Open
#21 9 comments 0 reactions 0 assignees View on GitHub
assigned enhancement help wanted
Dominant language
JavaScript
Stars
1.6k
Forks
78
PR merge metrics
No merged PRs in 30d

Description

## What you did:

Add this HTML snippet inside the response field. And you will see it render...

```

Hey you!

```

## What happened:

It rendered the HTML

![image](https://user-images.githubusercontent.com/3268013/56524971-3ef4fa80-6542-11e9-93c2-e50c947e6b35.png)

## 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.

Contributor guide

Open the contributing guide

Research direction

No file or test is named in issue #21. Start by reproducing the HTML rendering in the response field and locating the response-rendering entry point; clarify whether HTML should be escaped or supported, then verify the chosen behavior with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.