Page 1 of 1
HTML or even just a line break in Page Description?
Posted: Sun May 11, 2025 1:51 am
by linuxrichard
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
Re: HTML or even just a line break in Page Description?
Posted: Sun May 11, 2025 7:25 am
by zacharielle
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
Code: Select all
<?php echo $page->description() ?>
and replace it with
Code: Select all
<?php echo htmlspecialchars_decode($page->description()) ?>
For quoting, I would suggest semantic HTML such as:
Code: Select all
<blockquote cite="https://source-url">
<p>I have a dream</p>
</blockquote>
<p>— Martin Luther King</p>
(block elements, will be on new lines)
or
(inline element)
this is better for accessibility

Re: HTML or even just a line break in Page Description?
Posted: Mon May 12, 2025 6:33 am
by indocreativemedia
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?
Re: HTML or even just a line break in Page Description?
Posted: Wed Jun 04, 2025 8:36 pm
by jolly98
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
Re: HTML or even just a line break in Page Description?
Posted: Sat Jun 21, 2025 4:17 pm
by jack989
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