# HTML character references is not decoded correctly in Bitmovin player for DASH stream

**URL:** <https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093>\
**Category:** Support\
**Tags:** dash\
**Created:** [June 29, 2023, 4:51pm UTC](https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093 "2023-06-29T16:51:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanal.nandakumar](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sanal.nandakumar](https://community.bitmovin.com/u/sanal.nandakumar)\
**Post date:** [June 29, 2023, 4:51pm UTC](https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093/1 "2023-06-29T16:51:58Z")

</div>

Bitmovin team,  
We encountered playback issue for DASH stream. On preliminary analysis, we found that the segment requests failed to resolve. Meanwhile we are getting successful response for the manifest request. Checking the payload for the manifest request and segment request we noticed a discrepancy. On further investigation it is confirmed that the Bitmovin Player is not decoding the HTML character references for the segment request. We have double confirmed that the stream is having functional playback in a Bitmovin test player. Please find the screenshots attached.

 ![payload-segment-request](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/9d4efac27d18206cecab690dbeaebaef7dfce1fd.png)

---

<div class="post-metadata">

**Author:** ![sanal.nandakumar](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sanal.nandakumar](https://community.bitmovin.com/u/sanal.nandakumar)\
**Post date:** [June 29, 2023, 4:54pm UTC](https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093/2 "2023-06-29T16:54:29Z")

</div>

Attaching screenshot of payload of manifest request

 ![payload-manifest-request](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/e4b1c632654dd2d828f8d0aa7001749bc521113c.png)

---

<div class="post-metadata">

**Author:** ![sanal.nandakumar](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sanal.nandakumar](https://community.bitmovin.com/u/sanal.nandakumar)\
**Post date:** [June 29, 2023, 4:55pm UTC](https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093/3 "2023-06-29T16:55:40Z")

</div>

Attaching screenshot of response of segment request

 ![response-segment-request](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/b5d538471baf2b8165b73b6c00391294e4126f57.png)

---

<div class="post-metadata">

**Author:** ![lucky.goyal](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/lucky.goyal/32/506_2.png) [@lucky.goyal](https://community.bitmovin.com/u/lucky.goyal)\
**Post date:** [June 29, 2023, 5:28pm UTC](https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093/4 "2023-06-29T17:28:11Z")

</div>

Hi @sanal.nandakumar , welcome to Bitmovin community and thanks for sharing this issue. Normally the query parameters required by your origin server/CDN should be also part of the segment URL’s provided in DASH MPD file. From above information it is not clear if the segment URL in DASH MPD contains required query parameters.

To allow us look into it can you please provide following additional information?

- A sample player page where we can replicate this behaviour?
- Sample DASH asset URL
- A network trace of failing session(either HAR export or Charles capture)

---

<div class="post-metadata">

**Author:** ![sanal.nandakumar](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sanal.nandakumar](https://community.bitmovin.com/u/sanal.nandakumar)\
**Post date:** [June 29, 2023, 6:18pm UTC](https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093/5 "2023-06-29T18:18:26Z")

</div>

Please find our response below :

- A sample player page where we can replicate this behaviour?

> Please follow the below steps to replicate the behavior  
> URL : [Web UI](http://edge.staging.ovp.ses.com/web/yourtv)
> 
> Username : 13754  
> Password : 12345678
> 
> Search for the asset : ‘Morgana: La Detective Genial’  
> Play the First Episode.

- Sample DASH asset URL

> MANIFEST URL - [https://d24b4000n87410.cloudfront.net/mso\_dish\_mx/out/v1/bf7391e084e4463ca5296ddab09c3b89/1e6e97208715426abc619e4629cc173e/a3b7607296c04f9793c426b577caa68d/index.mpd?Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vZDI0YjQwMDBuODc0MTAuY2xvdWRmcm9udC5uZXQvbXNvX2Rpc2hfbXgvb3V0L3YxL2JmNzM5MWUwODRlNDQ2M2NhNTI5NmRkYWIwOWMzYjg5LzFlNmU5NzIwODcxNTQyNmFiYzYxOWU0NjI5Y2MxNzNlLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2ODgzMjEwNDB9fX1dfQ\_\_&Signature=jXu1BIsu-NN05~Cg7RGkxfGjoMzUUDoXmMnm~sE9iv9hBTVyCyGGEkwuL3uAiDqDeK80-fYtNSEz2anAH9gvkgXko4PWjmff1y4ovcoSyy62zJqrfU3fuEvRruE3HrCOztjtT7pRKq1tuF-CoRQGacBRQOEZdIfSQj6pNjhOP7d8OrudTuEflp4~Iva7e0EQN6velGoP6YZU5P2SY5GrDP3Amjbbh1F4tYl-JPv1wSbMPoZss9aCUwTpOpIXrn0cC68goxp175JEBgq9zUUpkE7rVJDjwNo4xzp5aswUtt0y97Kl-r4XRoz1h5CYKUK7yA3H6qROw3ivmNZZCQcSFw\_\_&Key-Pair-Id=KQE7CFI1XG05C&provider=ole0&cid=63ee387bf00a561a6bd61577](https://d24b4000n87410.cloudfront.net/mso_dish_mx/out/v1/bf7391e084e4463ca5296ddab09c3b89/1e6e97208715426abc619e4629cc173e/a3b7607296c04f9793c426b577caa68d/index.mpd?Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vZDI0YjQwMDBuODc0MTAuY2xvdWRmcm9udC5uZXQvbXNvX2Rpc2hfbXgvb3V0L3YxL2JmNzM5MWUwODRlNDQ2M2NhNTI5NmRkYWIwOWMzYjg5LzFlNmU5NzIwODcxNTQyNmFiYzYxOWU0NjI5Y2MxNzNlLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2ODgzMjEwNDB9fX1dfQ __&Signature=jXu1BIsu-NN05%7ECg7RGkxfGjoMzUUDoXmMnm%7EsE9iv9hBTVyCyGGEkwuL3uAiDqDeK80-fYtNSEz2anAH9gvkgXko4PWjmff1y4ovcoSyy62zJqrfU3fuEvRruE3HrCOztjtT7pRKq1tuF-CoRQGacBRQOEZdIfSQj6pNjhOP7d8OrudTuEflp4%7EIva7e0EQN6velGoP6YZU5P2SY5GrDP3Amjbbh1F4tYl-JPv1wSbMPoZss9aCUwTpOpIXrn0cC68goxp175JEBgq9zUUpkE7rVJDjwNo4xzp5aswUtt0y97Kl-r4XRoz1h5CYKUK7yA3H6qROw3ivmNZZCQcSFw__ &Key-Pair-Id=KQE7CFI1XG05C&provider=ole0&cid=63ee387bf00a561a6bd61577)

---

<div class="post-metadata">

**Author:** ![sanal.nandakumar](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sanal.nandakumar](https://community.bitmovin.com/u/sanal.nandakumar)\
**Post date:** [June 29, 2023, 6:18pm UTC](https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093/6 "2023-06-29T18:18:58Z")

</div>

- A network trace of failing session(either HAR export or Charles capture)

> Please find the HAR export and Manifest files attached in the dropbox.  
> [Dropbox - Bitmovin - HTML CR issue - Simplify your life](https://www.dropbox.com/sh/dvwsyyg4bkfm54h/AADfDVdUqzE7zH4gF_hkov_aa?dl=0)

---

<div class="post-metadata">

**Author:** ![lucky.goyal](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/lucky.goyal/32/506_2.png) [@lucky.goyal](https://community.bitmovin.com/u/lucky.goyal)\
**Post date:** [June 29, 2023, 8:12pm UTC](https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093/7 "2023-06-29T20:12:30Z")

</div>

Thanks for sharing the details. I can replicate the behaviour and see that `&amp;` encoding is present in the query parameters in segment URL’s in MPD file. This encoding is normally needed when `&` is being used in text in an HTML page. This is not required inside MPD file.

```auto
In HTML, the ampersand character (“&”) declares the beginning of an entity reference (a special character). If you want one to appear in text on a web page you should use the encoded named entity “&amp;”

```

As a quick solution, you can use following [network configuration](https://cdn.bitmovin.com/player/web/8/docs/interfaces/core_config.playerconfig.html#network) to rewrite MPD response to replace all `&amp;` with `&` and this should resolve the issue with segment requests.

```auto
    network: {
      preprocessHttpResponse: function (type, response) {         
        if (type === 'manifest/dash') {
          response.body = response.body.replaceAll(/&amp;/g, '&');
        }
        return Promise.resolve(response);
      },
    },

```

Please let us know if this solution helps.

---

<div class="post-metadata">

**Author:** ![sanal.nandakumar](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sanal.nandakumar](https://community.bitmovin.com/u/sanal.nandakumar)\
**Post date:** [June 30, 2023, 4:21am UTC](https://community.bitmovin.com/t/html-character-references-is-not-decoded-correctly-in-bitmovin-player-for-dash-stream/2093/8 "2023-06-30T04:21:57Z")

</div>

Hello Goyal,

Thank you for the response. We will check with the content provider with the given update. We will get back to you if in need of any further updates.

Sanal
