Opened 8 years ago
Last modified 6 years ago
#39543 new defect (bug)
Certain Strings When Pasted Into Title Bar Cause Loss of Styling
Reported by: | Tranny | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | General | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
To reproduce:
1 - open startpage.com or similar search engine that doesn't use URL redirects
2 - search for string that contains special characters, for example: "Nova Fátima (Paraná)"
3 - highlight "Nova Fátima (Paraná)" from the top result (https://pt.wikipedia.org/wiki/Nova_F%C3%A1tima_(Paran%C3%A1)) and copy it to clipboard
4 - on /wp-admin/post-new.php paste the content of your clipboard to where t says "Enter title here"
5 - ta da
Change History (3)
#2
@
8 years ago
@SergeyBiryukov
I tried it on two different WP installations, which are each hosted on different servers with different companies. Both use TwentySixteen default theme, and while both have some plugins activated, each has different plugins, and not many of them (no exotic plugins installed).
I noticed that this only happens when a hyperlinked text is copy-pasted into the title bar. I'm on a Windows computer, and when I highlight a hyperlinked text (such as a clickable search result), the text gets copied along with the link it is associated with. So if I subsequently go to an advanced text editor (such as Microsoft Word) and paste it there, it will be pasted in the document as hyperlinked text.
Pasting text that's been copied along with the embedded hyperlink is when it breaks the styling. But if I copy the hyperlinked text, paste it in some basic text editor (such as Notepad), which only deals with plain text, then the hyperlink is stripped, so if I highlight the text again, and copy if off Notepad again (ie now the copied text is plain text string, so it won't paste as hyperlinked into Microsoft Word), styling doesn't get broken, and everything works fine.
So to reproduce, make sure you copy a hyperlinked text, and test it on something like Microsoft Word to make sure it is copied hyperlinked. Also, I noticed that it's only some hyperlinks that break it, not all. For example an English language Wikipedia page doesn't break it.But the Portuguese one does.
Hi @Tranny, thanks for the ticket!
I could not reproduce the issue on a clean install, both the string and the URL are correctly saved as a post title.
Does it still happen with all plugins disabled and a default theme (Twenty Seventeen or Twenty Sixteen) activated?