Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Post History

83%
+8 −0
Q&A Although div tag is not allowed, it's rendered in the preview

tl;dr According to this post, the div tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be c...

0 answers  ·  posted 2y ago by hkotsubo‭  ·  edited 4mo ago by Monica Cellio‭

#8: Post edited by user avatar Monica Cellio‭ · 2023-12-04T03:49:23Z (4 months ago)
https://github.com/codidact/qpixel/pull/1173
#7: Post edited by user avatar hkotsubo‭ · 2022-02-06T17:14:44Z (about 2 years ago)
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://a.dev.codidact.org/posts/316), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post. If a tag is removed from the saved post, the preview should remove it as well.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • One interesting detail: if you try to edit the [test post in dev server](https://a.dev.codidact.org/posts/316), you'll notice that the `div` is still there. So it wasn't actually removed from the markdown text, it's just not rendered in the final HTML.
  • ---
  • PS: I've also tested with `kbd` and the same happens (it's rendered in the preview, and removed after saving the post). I haven't tested with other tags.
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://a.dev.codidact.org/posts/316), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post. If a tag is removed from the saved post, the preview should remove it as well.
  • I believe that both should render everything the same way, whenever it's possible. This would avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • One interesting detail: if you try to edit the [test post in dev server](https://a.dev.codidact.org/posts/316), you'll notice that the `div` is still there. So it wasn't actually removed from the markdown text, it's just not rendered in the final HTML.
  • ---
  • PS: I've also tested with `kbd` and the same happens (it's rendered in the preview, and removed after saving the post). I haven't tested with other tags.
#6: Post edited by user avatar hkotsubo‭ · 2022-02-06T17:07:26Z (about 2 years ago)
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://a.dev.codidact.org/posts/316), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post. If a tag is removed from the saved post, the preview should remove it as well.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • PS: I've also tested with `kbd` and the same happens (it's rendered in the preview, and removed after saving the post). I haven't tested with other tags.
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://a.dev.codidact.org/posts/316), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post. If a tag is removed from the saved post, the preview should remove it as well.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • One interesting detail: if you try to edit the [test post in dev server](https://a.dev.codidact.org/posts/316), you'll notice that the `div` is still there. So it wasn't actually removed from the markdown text, it's just not rendered in the final HTML.
  • ---
  • PS: I've also tested with `kbd` and the same happens (it's rendered in the preview, and removed after saving the post). I haven't tested with other tags.
#5: Post edited by user avatar hkotsubo‭ · 2021-10-06T17:11:29Z (over 2 years ago)
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://a.dev.codidact.org/posts/316), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post. If a tag is removed from the saved post, the preview should remove it as well.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • PS: I haven't tested with other tags.
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://a.dev.codidact.org/posts/316), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post. If a tag is removed from the saved post, the preview should remove it as well.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • PS: I've also tested with `kbd` and the same happens (it's rendered in the preview, and removed after saving the post). I haven't tested with other tags.
#4: Post edited by user avatar hkotsubo‭ · 2021-10-06T13:12:33Z (over 2 years ago)
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://meta.codidact.com/posts/277420), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post. If a tag is removed from the saved post, the preview should remove it as well.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • PS: I haven't tested with other tags.
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://a.dev.codidact.org/posts/316), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post. If a tag is removed from the saved post, the preview should remove it as well.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • PS: I haven't tested with other tags.
#3: Post edited by user avatar hkotsubo‭ · 2021-10-06T12:28:10Z (over 2 years ago)
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://meta.codidact.com/posts/277420), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • PS: I haven't tested with other tags.
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://meta.codidact.com/posts/277420), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post. If a tag is removed from the saved post, the preview should remove it as well.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • PS: I haven't tested with other tags.
#2: Post edited by user avatar hkotsubo‭ · 2021-10-06T12:25:19Z (over 2 years ago)
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://meta.codidact.com/posts/277420), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • PS: I haven't tested with other tags.
  • # tl;dr
  • According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.
  • ---
  • I've made [this test on the dev server](https://meta.codidact.com/posts/277420), using HTML that contains a `div`.
  • In the post editor, I've used this HTML:
  • ```html
  • <div dir="rtl">abc...</div>
  • ```
  • <sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>
  • ---
  • In the preview, the `div` is rendered:
  • ![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)
  • We can see the `div` is there in the preview, by checking the browser's console, and also by noting that `dir="rtl"` was applied (text is using right-to-left direction).
  • ---
  • But when I save the post, the `div` is removed:
  • ![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)
  • We can see that by checking the browser's console, and also noting that right-to-left is no longer being applied (which confirms that the tag was removed).
  • ---
  • **This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post.
  • I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.
  • ---
  • PS: I haven't tested with other tags.
#1: Initial revision by user avatar hkotsubo‭ · 2021-10-06T12:20:20Z (over 2 years ago)
Although div tag is not allowed, it's rendered in the preview
# tl;dr

According to [this post](https://meta.codidact.com/posts/277420), the `div` tag is not allowed, thus it's removed from posts. But it's not removed from the preview, and I believe both (the preview and the final saved post) should be consistent between each other.

---

I've made [this test on the dev server](https://meta.codidact.com/posts/277420), using HTML that contains a `div`.

In the post editor, I've used this HTML:

```html
<div dir="rtl">abc...</div>
```

<sup>I'm using `dir="rtl"` because it gives a good visual hint that the `div` is there, as we can see in the images below.</sup>

---

In the preview, the `div` is rendered:

![div is rendered in the preview](https://meta.codidact.com/uploads/Xiaq8VP1LvzKXbrLVN44u2px)

---

But when I save the post, the `div` is removed:

![div is removed from the saved post](https://meta.codidact.com/uploads/W4tQhT2KWKy16tJMyJhYehxy)

---

**This is not a feature request to add support for `div`**. It's a bug report about the inconsistency between the preview and the final rendered post.

I believe that both should render everything the same way, whenever it's possible. This avoid situations where an user thinks their HTML will work, but will find out it doesn't work only after saving the post.

---

PS: I haven't tested with other tags.