You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Dope theme is coded to output an excerpt limited to 33 words. I have a post which includes an "'s" on the 33rd word. When Ghost is generating the excerpt for that post to display in a tag feed (or author feed), the last word has a stray ampersand (&) instead of including the full "'s" - e.g., "it&" instead of "it's".
With the Dope theme as coded, the issue can be reproduced with this text as the body of the post:
one two three four five six seven eight nine ten one two three four five six seven eight nine ten one two three four five six seven eight nine ten one two three's four
Since this is a bug in the excerpt helper and not Dope, this should be easily reproducible by moving the "'s" in the above text block to whatever word limit is specified for a theme. Screenshot of the issue:
Steps to Reproduce
Identify or modify a theme so a word limit is passed into the excerpt helper
Create or identify a post with a body exceeding the word limit.
For the word at the word limit identified in step 1, add "'s" to the end of the word - e.g., if the theme is configured to cut off the excerpt at 33 words, add "'s" to the 33rd word.
Save the post
Navigate to a feed that will display the post and locate the post excerpt
Ghost Version
5.105.0
Node.js Version
20.18.1
How did you install Ghost?
VirtualBox VM running Linux Mint 22
Database type
MySQL 8
Browser & OS version
No response
Relevant log / error output
No response
Code of Conduct
I agree to be friendly and polite to people in this repository
The text was updated successfully, but these errors were encountered:
Hello @brandishwar, thank you for reporting this issue. I’ve been able to reproduce it on the Dope theme using the steps you provided.
The Dope theme uses {{excerpt words="33"}}
There seems to be a bug in our excerpt helper, where we escape the excerpt first (it's becomes it's) and then truncate it based on the words or characters option (code).
I’m marking this as a bug. Would love a PR for this if you’re interested in working on a fix 🙏
Issue Summary
The Dope theme is coded to output an excerpt limited to 33 words. I have a post which includes an "'s" on the 33rd word. When Ghost is generating the excerpt for that post to display in a tag feed (or author feed), the last word has a stray ampersand (&) instead of including the full "'s" - e.g., "it&" instead of "it's".
With the Dope theme as coded, the issue can be reproduced with this text as the body of the post:
Since this is a bug in the excerpt helper and not Dope, this should be easily reproducible by moving the "'s" in the above text block to whatever word limit is specified for a theme. Screenshot of the issue:
Steps to Reproduce
Ghost Version
5.105.0
Node.js Version
20.18.1
How did you install Ghost?
VirtualBox VM running Linux Mint 22
Database type
MySQL 8
Browser & OS version
No response
Relevant log / error output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: