pressbooks / pressbooks-book-directory-fe

A Vue.js frontend for the Pressbooks Directory
0 stars 1 forks source link

Use short description on book cards when long description is unavailable #192

Closed richard015ar closed 3 years ago

richard015ar commented 3 years ago

Some books have 'short descriptions' but no 'long descriptions' entered in their BookInfo page. Where true, we should display the short description ('disambiguatingDescription') as the Description on that item's book card in the Directory. Screenshot from 2021-02-26 10-37-23

richard015ar commented 3 years ago

@SteelWagstaff should I include the anchor links allowed with the new sanitization?

richard015ar commented 3 years ago

From: https://github.com/pressbooks/pressbooks/pull/2099 We know short descriptions allows HTML elements. We don't want links or raw a tags in the book cards. I will implement some kind of sanitization for those cases.

If there are some URL in the short description, keep it as a string rather tan convert to a link.

SteelWagstaff commented 3 years ago

Tested and works as expected on dev and staging networks network.