# Can't use the percentage sign (%) inside a block's text

**URL:** https://forum.makecode.com/t/cant-use-the-percentage-sign-inside-a-blocks-text/4663
**Category:** Maker
**Created:** [November 27, 2020, 3:09pm UTC](https://forum.makecode.com/t/cant-use-the-percentage-sign-inside-a-blocks-text/4663 "2020-11-27T15:09:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![arduino12](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@arduino12](https://forum.makecode.com/u/arduino12)
#### Post date: [November 27, 2020, 3:09pm UTC](https://forum.makecode.com/t/cant-use-the-percentage-sign-inside-a-blocks-text/4663/1 "2020-11-27T15:09:53Z")

</div>

**Hi**

I am trying to create a block for humidity sensor,  
I want the text on it to be: “humidity (%)”,  
But the Makecode keep shows the wrong text…

```auto
namespace mysensor {
	/**
	 * get humidity as a relative percentage value.
	 */
	//% block="humidity (%)"
	export function humidity(): number {
		return sample.humidity;
	}
}

```

**I tried escaping the percentage sign (%) using:**  
“%%”  
“%”  
“\u0025”  
“\uf295” (font awesome % icon)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/75acea3230c976616400fe7d46445ef08b00dd40.png)

But none of this works ☹  
Looking forward for some help,  
Thanks,  
**Arad**

---

<div class="post-metadata">

### Author: ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)
#### Post date: [November 27, 2020, 7:31pm UTC](https://forum.makecode.com/t/cant-use-the-percentage-sign-inside-a-blocks-text/4663/2 "2020-11-27T19:31:43Z")

</div>

Here’s a block we have with it escaped properly: [https://github.com/microsoft/pxt-common-packages/blob/ee347224faa9135b57017bbf68bf8859c616ed1d/libs/game/mathUtil.ts#L7](https://github.com/microsoft/pxt-common-packages/blob/ee347224faa9135b57017bbf68bf8859c616ed1d/libs/game/mathUtil.ts#L7) (the two slashes should be enough, the bar is just spacing)

---

<div class="post-metadata">

### Author: ![arduino12](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@arduino12](https://forum.makecode.com/u/arduino12)
#### Post date: [November 28, 2020, 4:25am UTC](https://forum.makecode.com/t/cant-use-the-percentage-sign-inside-a-blocks-text/4663/3 "2020-11-28T04:25:26Z")

</div>

**Thanks!**  
Yes the “\%” does the job!
