# Editor display bug: private truncated string

**URL:** <https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759>\
**Category:** CMS Development\
**Created:** [April 20, 2021, 7:39am UTC](https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759 "2021-04-20T07:39:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CBeringer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cberinger/32/99730_2.png) [@CBeringer](https://community.hubspot.com/u/CBeringer)\
**Post date:** [April 20, 2021, 7:39am UTC](https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759/1 "2021-04-20T07:39:34Z")

</div>

Hey everyone,

I’m using image files within my theme to pre-populate some editor fields with demo content.

The images call in the fields.json per module look like

`"src": "{{ get_asset_url('...') }}" `

Now, my question: in the hubspot page editor, all module entries that rely on images show an wrongly truncated filename, see screenshots. Any idea how to avoid this and only show “clean” filenames?

 ![41195iA9CEECC804DE0D69.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/b/5b699ba2bd6ee92787ce302f4848621be79ebd3b.png)

 ![41194i8D39F52D9E409FC6.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/0/302e19bcd23b074b1284e71ca675b39f14b9fb08.png)

Thanks a lot in advance

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [April 20, 2021, 12:39pm UTC](https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759/2 "2021-04-20T12:39:20Z")

</div>

Hey @CBeringer

Have you tried the expression without the wrapping double quotes?

---

<div class="post-metadata">

**Author:** ![CBeringer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cberinger/32/99730_2.png) [@CBeringer](https://community.hubspot.com/u/CBeringer)\
**Post date:** [April 20, 2021, 12:43pm UTC](https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759/3 "2021-04-20T12:43:49Z")

</div>

Hey @Kevin-C ,

thanks for your answer. Leavin out the double quotes leads to an validation error “was expecting double-quote to start field name”.

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [April 20, 2021, 2:18pm UTC](https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759/4 "2021-04-20T14:18:33Z")

</div>

Instead of quotes try using the tojson filter.

`"src": {{ get_asset_url('...')|tojson }}`

---

<div class="post-metadata">

**Author:** ![CBeringer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cberinger/32/99730_2.png) [@CBeringer](https://community.hubspot.com/u/CBeringer)\
**Post date:** [April 20, 2021, 2:23pm UTC](https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759/5 "2021-04-20T14:23:37Z")

</div>

Hey @alyssamwilie ,

thanks for your answer! Sadly it won’t work in this case, because this will not be validated by the Hubspot CLI and therefore not uploaded when using the HS CLI as a watcher. Same error as above (“was expecting double-quote to start field name”)

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [April 20, 2021, 2:49pm UTC](https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759/6 "2021-04-20T14:49:37Z")

</div>

@CBeringer Tried a bunch of different things, but I think the fields.json just isn’t meant to use HubL.

---

<div class="post-metadata">

**Author:** ![CBeringer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cberinger/32/99730_2.png) [@CBeringer](https://community.hubspot.com/u/CBeringer)\
**Post date:** [April 20, 2021, 2:59pm UTC](https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759/7 "2021-04-20T14:59:46Z")

</div>

@alyssamwilie thanks you very much for investigating here. When referring the img src with an relative path without HubL, HS does not resolve the path correctly, so no img found. Alternative would be an absolute url, which is not a good thing when transferring the theme to my clients account. So seems like there’s not a perfect solution for relative src default images in a module.

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [April 20, 2021, 2:51pm UTC](https://community.hubspot.com/t/editor-display-bug-private-truncated-string/35759/8 "2021-04-20T14:51:57Z")

</div>

@CBeringer You could instead just call the URL directly. I believe the structure is --

`//f.hubspotusercontent00.net/hubfs/PORTALID/raw_assets/public/image_file.png`
