Actions
Patch #44662
openAvatar in the user edit title is inserted at the last space of the whole title HTML
Patch #44662:
Avatar in the user edit title is inserted at the last space of the whole title HTML
Status:
New
Priority:
Normal
Assignee:
-
Category:
Accounts / authentication
Target version:
-
Description
While creating this patch #44660 the following was discovered:
app/views/users/edit.html.erb puts the avatar into the page title by inserting it after the last space in the HTML returned by title:
This works today because the title ends with ยป login</h2> and a login has no spaces. But the search is not limited to the heading: if anything follows the <h2> in the returned HTML (for example a plugin that appends to the title through a helper override), the last space can be inside that markup, and the avatar is inserted there, which produces invalid HTML.
The attached patch limits the search to the heading, so the avatar is always placed before the login inside the <h2>:
The output is unchanged for core as it is. Against trunk.
Files
Updated by Go MAEDA 25 days ago
- Related to Patch #5899: Display user's gravatar when editing profile added
Actions