HTML or even just a line break in Page Description?
-
- Jr. Bludit
- Posts: 7
- Joined: Mon Apr 07, 2025 12:09 pm
- Has thanked: 2 times
Hi,
For one particular page, I am using a quote from a well known person. I'd like to have a line break "<br>" between the end fo the quite and the person's name. But the description field (Edit content, Options, Description) doesn't seem to allow HTML or even line breaks based on pressing the Enter key. Any suggestions how I could get around this?
Many thanks for reading this far. Any help will be very gratefully received!
Version info: Bludit 3.16.2 using Massively 2.1 on Apache 2.4.52 and PHP 8.4.6 on Linux
For one particular page, I am using a quote from a well known person. I'd like to have a line break "<br>" between the end fo the quite and the person's name. But the description field (Edit content, Options, Description) doesn't seem to allow HTML or even line breaks based on pressing the Enter key. Any suggestions how I could get around this?
Many thanks for reading this far. Any help will be very gratefully received!
Version info: Bludit 3.16.2 using Massively 2.1 on Apache 2.4.52 and PHP 8.4.6 on Linux
- zacharielle
- Ssr. Bludit
- Posts: 13
- Joined: Sat Jan 07, 2023 7:51 am
- Has thanked: 11 times
- Been thanked: 10 times
Hi,
You can use <br> in the description field and use the htmlspecialchars_decode php function while printing this description in your theme.
In your theme, find
and replace it with
For quoting, I would suggest semantic HTML such as:
(block elements, will be on new lines)
or
(inline element)
this is better for accessibility
You can use <br> in the description field and use the htmlspecialchars_decode php function while printing this description in your theme.
In your theme, find
Code: Select all
<?php echo $page->description() ?>
Code: Select all
<?php echo htmlspecialchars_decode($page->description()) ?>
Code: Select all
<blockquote cite="https://source-url">
<p>I have a dream</p>
</blockquote>
<p>— Martin Luther King</p>
or
Code: Select all
<q>Hello World!</q>
<br>
Everyone
this is better for accessibility

- indocreativemedia
- Jr. Bludit
- Posts: 9
- Joined: Sun Sep 24, 2023 5:09 am
- Been thanked: 2 times
Actually, the Page Description should work the way it is now, useful for SEO purpose.
That being said, you shouldn't use Page Description in this case.
I haven't test the Massively theme, but, if you write that quote as a page content, shouldn't it outputted on the page just fine?
That being said, you shouldn't use Page Description in this case.
I haven't test the Massively theme, but, if you write that quote as a page content, shouldn't it outputted on the page just fine?
In a page description, a line break can be achieved using the HTML <br> tag. This tag inserts a single line break within the text, without creating a new paragraph. It's useful for situations where you want to force text to the next line, like in addresses or poems, where line divisions are important...apna Khata
Yes, you can use HTML's line break tag (<br>) or other HTML elements to format the page description, which is often used in meta descriptions. While line breaks are technically possible, using them in meta descriptions might not always render as intended across all browsers and search engines. It's generally recommended to keep the description concise and avoid excessive formatting.
Pikashow
Pikashow