Follow-up to #2616880: Port html_title to D8
# Summary
Drupal node titles are restrictive and do not support italicized text or superscript text (e.g., Book titles, trademark symbols). The HTML Title module allows a limited set of HTML markup (em, sub, sup, b, i, strong, cite, code, bdi, wbr) to be used in node titles. It filters all other markup from titles to prevent XSS vulnerabilities or irrational nesting (e.g., links within links).
# Project URL
https://www.drupal.org/project/html_title
# Where is the code?
https://github.com/mohit-rocks/html_title
More stable : https://github.com/ciandt-china-dev/html_title
# Estimated completion date
# Dependencies
Unknown
# Who's doing the port?
https://www.drupal.org/user/639098/
# What help do they need?
Unknown
# D8 roadmap
At first port basic functionality provided by D7 module.
# Background and reference information
Unknown
Comments
Comment #2
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #3
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #4
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #5
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #6
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #7
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #8
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedAlmost all the basic features provided in Drupal 7 version are working fine.
Comment #9
reekris CreditAttribution: reekris commented@mohit_aghera I'm looking for this functionaltiy for Drupal 8. What is the status of the code at github? Is it ready for an initial 8 version on drupal.org?
Comment #10
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commented@reekris It's pretty much stable with drupal 8 release. You can try it out. Let me know if you find any issues, i will try to fix it.
Comment #11
balawang CreditAttribution: balawang at CI&T commented@mohit_aghera,
we have installed your branch and did some comparison to the version we ported. There are few differences, especially for your branch HtmlTitleFormatter is new from D7.
Besides, we've got few ideas for us to discuss with your branch which are new or different from D7 version:
1. New HTMLTitleFormatter added, we have to edit the system Content list views to change Content Title to HTML Title format, otherwise, the html tags show up in content list. Apply to all title using html title, it was automatically transformed in D7.
2. If it's good to have HTML Title as format for the other string field, which we think it should focus on Title.
You may also instlal and review @sean_cit's code at github https://github.com/ciandt-china-dev/html_title. Then, we will be happy to discuss how to merge our code.
Regards,
Comment #12
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commented@balawang
Sure, we can discuss it and merge it to single module. That will be much better.
Comment #13
echoz CreditAttribution: echoz commentedDrupal 8.1.8
Installed the version at https://github.com/mohit-rocks/html_title and it broke the site with:
Warning: array_unique() expects parameter 1 to be array, null given in html_title_preprocess_page_title() (line 40 of PATH_TO_modules/html_title/html_title.module).
Installed the version at https://github.com/ciandt-china-dev/html_title from #11 and it seems to be working fine.
Can we please have a official dev version?
Comment #14
echoz CreditAttribution: echoz commented@balawang the version from the github link in #11 as I wrote does work, but (even after first removing the html in all Titles) the uninstall wants to delete blocks and custom views (even those whos content did not ever use html title)!
Comment #15
echoz CreditAttribution: echoz commentedStill wanting help to completely remove the @sean_cit html_title module. It has references to html_title in the serialized data of all the views in the config table. It's listed as a dependency module in every view. Can anyone suggest a MySQL command to remove?
Comment #16
ker688@gmail.com CreditAttribution: ker688@gmail.com commentedHi mohit_aghera,
Do you believe it's good to create a D8 branch now
we use the source code which balawang mentioned, we also fixed some issues, I think it's better to have D8 branch now.
what do you think ?
Thanks.
Comment #17
lamp5Hi.
#11 work well on D8.3 :)
Comment #18
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #19
ericpughThanks for your work, everyone! Would it be possible to get the "most stable" version as an 8.x-dev release?
Comment #20
markhalliwellDuplicate module? https://www.drupal.org/project/html_titles
Comment #21
DakwamineThe purpose of those modules is the same: adding html markup to the title. Here are some noticeable differences about their design:
Comment #22
markhalliwellI'm aware of the differences, I was just asking if that module should be marked as a duplicate of this one. It's confusing to have competing modules with the same name.
Comment #23
DakwamineOh, ok, sorry. It is indeed confusing to have those two modules with a very similar name and purpose. I don't have the power to mark a module as duplicate though.
edit: and if someone has to mark it as duplicate, maybe we should try to get a stable, or at least, "official" release on the html_title module page before. ^^'
Comment #24
mmjvb CreditAttribution: mmjvb as a volunteer commentedNo branch on d.o, set back to Needs work.
Comment #25
DakwamineCan we get this module on the drupal.org repository so we can start reviews and report issues?
Comment #26
kevinc_ CreditAttribution: kevinc_ commentedDoes it have to be @generalredneck who creates the new branch as he was the original creator?
I'd really value this being managed under DO to be able to raise issues and track changes.
Comment #27
smithkr CreditAttribution: smithkr commentedI'm looking for this functionality for Drupal 8...has there been any movement towards an initial 8 version on drupal.org?
Thanks!
Comment #28
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commented@smithkr
https://github.com/ciandt-china-dev/html_title this implementation is working fine.
You can use this for now, till we don't sort out port on this repository itself.
Comment #29
mohit_aghera CreditAttribution: mohit_aghera as a volunteer and at Axelerant commentedComment #30
smithkr CreditAttribution: smithkr commented@mohit_aghera Thanks!
Comment #31
generalredneckI wanted to point out that the original maintainers nor I posted this, and there isn't an issue in the html_title issue queue, so until Mohit hit me up directly I was unaware that this was even a thing. So, First I've done a code review and found both examples lacking and encourage you all to hold off on installing this functionality until it gets to D.O. Mohit and myself are working together to come up with a solution that is satisfactory. I've sent an email to ciandt as well but @balawang, maybe you would want to join in specifically. Feel free to DM me on slack.
Comment #32
generalredneckWanna throw out there that there was indeed an issue that was closed after I went looking for it. see #2616880: Port html_title to D8. However, it was before I took maintainership of the module so I missed all the closed tasks. We will work on this to do what we can. I'm sorry for my ignorance.
Comment #33
weynhamz@generalredneck, I am taking care of the CI&T's 8.x port now, PR for the fix you addressed in the email has been created, https://github.com/ciandt-china-dev/drupal-module-html_title/pull/4, re-applied ur fix for 7.x version, please review and I will merge it to the master.
Comment #34
Daniel KorteThanks for everyone's work on this. I cleaned up the 8.x port a bit and made a pull request on GitHub here:
Add support for smart quotes, fix broken HTML, add Configure link to modules page, and replace 'Html' with 'HTML'
https://github.com/ciandt-china-dev/drupal-module-html_title/pull/5
Patch file:
https://patch-diff.githubusercontent.com/raw/ciandt-china-dev/drupal-mod...
Comment #35
smithkr CreditAttribution: smithkr commentedHi there,
Is the update in #34 suitable for use?
Thanks!
Comment #36
smithkr CreditAttribution: smithkr commentedHi there,
I hope this is the right place for this question, since it's related to the Drupal 8 port, but I've found an issue with HTML tags being rendered in search results. Details are here: https://www.drupal.org/project/html_title/issues/3082047
Hope this helps.
Comment #37
mmjvb CreditAttribution: mmjvb as a volunteer commentedNo, this is not the right place for that question. You already placed the issue at the right place, the queue of the project itself. Unfortunately, you needed to assign it to 7.x, there is still no 8.x available! Your alternative is to raise the issue at github. Suggest to mention whether you applied pull/5.
When this issue would have contained a proper roadmap, your issue could have been mentioned there. Assuming it would fit in one of the milestones. As there is no roadmap, any issue about 8.x should be filed with the project itself.
The purpose of this issue is to communicate the status of the port.
Comment #38
smithkr CreditAttribution: smithkr commented@mmjvb Thanks––I've posted the issue on github.
Comment #39
generalredneckOk swung back around this way. I've released the 8.x-1.0-rc1 version given that I've had this work successfully on my own projects as well as many of you have. I want to give a big shout out to the CI&T China Developers developers and will be giving each person who committed work an attribution here on D.O to make sure that it's fair.
As for the rules of this post, since it's about the port to d8, I'm marking it as reviewed and tested and we can port the other issues that have come up in here over to the issue queue. (example smithkr's above).
Comment #40
JeroenTTagged 8.x-1.0.
Comment #41
JeroenTComment #42
apadernoI am giving credits to the users who participated in this issue.