The node module allows admins to edit the help text on the node/add/* forms.

This help text is printed via hook_help in the node module.

However, in node_help it wraps the users help text in a P tag.

This is a problem as it is not possible to theme out that p tag and make it something else, and it is possible to enter html as that help text.

So it is possible to add block elements like a UL tag that will be placed inside the P tag, which is invalid markup.

So either the P tag should be a DIV tag, or no tag, or else there should be an easy way to override the p tag to something else.

Comments

valthebald’s picture

Status: Active » Needs review
StatusFileSize
new777 bytes

I think that's a valid point, and I'd vote for the no wrapper tag at all

valthebald’s picture

Issue tags: +Novice
enginpost’s picture

Issue tags: -Novice

#1: Remove-p-tag-1888862.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Novice

The last submitted patch, Remove-p-tag-1888862.patch, failed testing.

enginpost’s picture

Status: Needs work » Needs review
StatusFileSize
new781 bytes

Rerolled the patch

valthebald’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine for me

alexpott’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs markup review

We should at least have screenshots of the change...

star-szr’s picture

StatusFileSize
new28.73 KB
new28.86 KB

(It would be nice if this and the node description had selectable text formats but that is very out of scope here.)

It feels a bit wrong to me that the help text would be floating in a <div> unless <p> tags or a <ul> or etc. are specifically added. But from a markup perspective I think this is okay. /node/add does something a bit similar with content type descriptions but each description is part of a definition list and the description ends up wrapper in a <dd> which legally can contain lists and etc. (flow content).

In any case, here are screenshots:

Before
1888862-8-before.png

After
1888862-8-after.png

Edited to add another reference.

utilum’s picture

StatusFileSize
new17.37 KB
new17.48 KB

I'm not sure what's wrong with the help text "floating in a <div>"... And the result looks the same to me. Good to go?

Before:

Before

After:

After

valthebald’s picture

Visual result should be the same.
Original issue claims to remove unnecessary wrapping of help text with <p>

utilum’s picture

#10 is correct, the visual is different, less space between help text and "Title*" label. I hadn't realised it needs to be identical.

valthebald’s picture

Not *that* level of identical. Less space is ok to me

rooby’s picture

I think less space possibly looks better in this case.

utilum’s picture

#help p is given 10px bottom margin in Seven theme's css. There's no similar rule for div tags, and that seems sensible.

xjm’s picture

Component: node.module » node system
Issue summary: View changes

(Merging "node system" and "node.module" components for 8.x; disregard.)

merilainen’s picture

Status: Needs review » Reviewed & tested by the community

The help text already gets a wrapping div, I think this is good to go.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Good catch.

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.