GiPHouse / Website

GiPHouse website based on Django Framework
https://giphouse.nl
GNU Affero General Public License v3.0
5 stars 2 forks source link

Convert plaintext URLs in project descriptions to hyperlinks #616

Closed 1058274 closed 1 year ago

1058274 commented 1 year ago

One-sentence description

Obvious plaintext URLs in project descriptions should automatically be detected and converted to HTML hyperlinks.

Desired functionality

Currently, project descriptions can not be set in any way to present URLs as HTML hyperlinks due to HTML character encoding. Superusers should be able to set a plaintext project description containing URLs where the URLs get converted to HTML hyperlinks in the front-end. This way, page visitors can directly visit a page mentioned in the project description using a single click.

Motivation

Nitpicking, perfectionism, and user experience.

Suggested implementation

JobDoesburg commented 1 year ago

I would suggest implementing an HTML field with TinyMCE as done in https://github.com/svthalia/concrexit

1058274 commented 1 year ago

I would suggest implementing an HTML field with TinyMCE as done in https://github.com/svthalia/concrexit

I had a look at TinyMCE's HTMLField and it looks like a better solution indeed, as it allows the admins to customize the project description in different ways and to preview the project descriptions in realtime instead of having to rely on some conversion from urlize that only gets applied after saving.

Other than hyperlinks, what other styling features should be allowed in the editor? Also, the output should go through a bleach tag that has been configured based on the predetermined allowed styling features, similar to how it has been implemented @ Thalia, correct?

JobDoesburg commented 1 year ago

Other than hyperlinks, what other styling features should be allowed in the editor? Also, the output should go through a bleach tag that has been configured based on the predetermined allowed styling features, similar to how it has been implemented @ Thalia, correct?

Maybe strong or italic text would be nice too, as well as uls and ols. I think the set Thalia implemented is very well thought-through so I propose to just copy it from them :)