# Strange behaviour of kirbytext() with unordered lists

**URL:** <https://forum.getkirby.com/t/strange-behaviour-of-kirbytext-with-unordered-lists/29676>\
**Category:** Questions\
**Tags:** v3\
**Created:** [October 5, 2023, 2:21pm UTC](https://forum.getkirby.com/t/strange-behaviour-of-kirbytext-with-unordered-lists/29676 "2023-10-05T14:21:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![steenweg](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@steenweg](https://forum.getkirby.com/u/steenweg)\
**Post date:** [October 5, 2023, 2:21pm UTC](https://forum.getkirby.com/t/strange-behaviour-of-kirbytext-with-unordered-lists/29676/1 "2023-10-05T14:21:47Z")

</div>

In a text field that I output with kirbytext() I just noticed a strange behavior:

The text field contains an unordered list in markdown:

```auto
- Beisitzer
- Vorsitzender
- Aufsichtsrat

```

The HTML looks as expected:

```auto
<ul>
	<li>Beisitzer</li>
	<li>Vorsitzender </li>
	<li>Aufsichtsrat</li>
</ul>

```

However, if one of the list items starts with a number, kirbytext() produces a nested list from it.

```auto
- Beisitzer
- 1. Vorsitzender
- Aufsichtsrat

```

The HTML will look like this:

```auto
<ul>
	<li>Beisitzer</li>
	<li>
		<ol>
			<li>Vorsitzender</li>
		<ol>
	</li>
	<li>Aufsichtsrat</li>
</ul>

```

This behavior is driving me crazy right now. On the website in question, there are list items in several places within unordered lists that start with a bullet number. Looks like a bug for me. Has anybody already experienced this behavior and knows a workaround?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [October 5, 2023, 2:25pm UTC](https://forum.getkirby.com/t/strange-behaviour-of-kirbytext-with-unordered-lists/29676/2 "2023-10-05T14:25:14Z")

</div>

That is expected behavior. You have to escapt such characters in Markdown, see [Daring Fireball: Markdown Syntax Documentation](https://daringfireball.net/projects/markdown/syntax#backslash)

---

<div class="post-metadata">

**Author:** ![steenweg](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@steenweg](https://forum.getkirby.com/u/steenweg)\
**Post date:** [October 5, 2023, 2:44pm UTC](https://forum.getkirby.com/t/strange-behaviour-of-kirbytext-with-unordered-lists/29676/3 "2023-10-05T14:44:36Z")

</div>

Sonja, you saved my day – again! Thanks a lot!

`- 1\. Vorsitzender`

results in a correct list item.

Still, I’m having a bit of a hard time acknowledging this as expected or even helpful behavior right now. Gruber writes “It’s worth noting that it’s possible to trigger an ordered list by accident”

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [October 5, 2023, 2:47pm UTC](https://forum.getkirby.com/t/strange-behaviour-of-kirbytext-with-unordered-lists/29676/4 "2023-10-05T14:47:10Z")

</div>

If you use Markdown, this is how it works. If you need a field only for lists, consider the list field.

---

<div class="post-metadata">

**Author:** ![steenweg](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@steenweg](https://forum.getkirby.com/u/steenweg)\
**Post date:** [October 5, 2023, 2:53pm UTC](https://forum.getkirby.com/t/strange-behaviour-of-kirbytext-with-unordered-lists/29676/5 "2023-10-05T14:53:21Z")

</div>

You have to know it… I write a lot in Markdown, but never stumbled over this in the last \>10 years.
