🇮🇷 Iran Proxy | https://www.wikipedia.org/wiki/Template_talk:Blockquote/testcases
Jump to content

Template talk:Blockquote

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Use <figcaption> or <p> for the quote's source/author instead of <cite>

[edit]

Right now, this template uses <cite> for the quote's source. Not only <cite> shouldn't be used for this purpose if the source isn't a creative work, but <cite> in this template is used inside <blockquote>, as if the source of the quote is a part of the quote itself, which is a very, very wrong way to cite a quote's source, wrongfulness of which is outlined even in the HTML5 specification (Attribution for the quotation, if any, must be placed outside the blockquote element).

So I suggest to either use <figcaption>, and wrap <blockquote> in <figure>, or just <p> outside of <blockquote> - both ways to cite a quote's source are recommended by the aforementioned specification. Sapphaline (talk) 09:37, 15 July 2025 (UTC)[reply]

Template:Blockquote/sandbox is available for anyone to edit. You'll be able to test new code at Template:Blockquote/testcases. – Jonesey95 (talk) 12:17, 15 July 2025 (UTC)[reply]
Seems like <figure> and <figcaption> are not currently allowed by MediaWiki for use in wikitext, so <p> is the only way to do it properly here. @Jonesey95: done; do you think this can be merged into the main template? Sapphaline (talk) 09:54, 28 July 2025 (UTC)[reply]
Some or all of the sandbox examples on the testcases page are missing the closing </blockquote> tag. – Jonesey95 (talk) 15:55, 28 July 2025 (UTC)[reply]
Solved. Sapphaline (talk) 16:39, 28 July 2025 (UTC)[reply]
Seeing no problems in the test cases, and being persuaded by the HTML specifications linked above, I have updated the code in the live template. Nice work. – Jonesey95 (talk) 20:26, 28 July 2025 (UTC)[reply]
Did you check what it looks like on mobile? The left side of the attribution is now level with the surrounding text, except on the first line which is indented. Hairy Dude (talk) 23:21, 28 July 2025 (UTC)[reply]
The testcases page looked (and looks) fine to me on mobile. It still uses the dumb gray line to the left of the blockquote, but I don't think I can control that. If you are reporting an issue, please link to an example page where we can see the problem. – Jonesey95 (talk) 00:55, 29 July 2025 (UTC)[reply]
Did you check what it looks like on mobile? - yes. Looks fine for me using browser device emulation with a 160px wide viewport. Sapphaline (talk) 11:37, 29 July 2025 (UTC)[reply]

Rquote broken

[edit]

{{Rquote/testcases}} appears to show that the above changes have broken the placement of source annotations. Sapphaline, would you like to take a look? – Jonesey95 (talk) 15:15, 3 August 2025 (UTC)[reply]

Fixed at Rquote, I'm pretty sure. – Jonesey95 (talk) 15:44, 3 August 2025 (UTC)[reply]

Error?

[edit]

Multiline parameter doesn't work on mobile version of Wikipedia. It doesn't show line break on mobile webpage. Can anyone fix this? Mehedi Abedin 05:23, 2 August 2025 (UTC)[reply]

 Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. If you found a page, where the template works incorrectly, please link to the page. Providing concrete examples on the test cases page will also be helpful. —⁠andrybak (talk) 10:33, 2 August 2025 (UTC)[reply]

Broken?

[edit]

Greetings and felicitations. I cannot get multiline to work with this quotation:

洪武元年二月壬子...至是,悉命復衣冠如唐制,士民皆束髮於頂,官則烏紗帽,圓領袍,束帶,黑靴。 On the Renzi day in the second month of the first year of Hongwu era (February 29, 1368 CE), Hongwu emperor decreed that all fashions of clothing and headwear shall be restored to the standard of Tang, all citizens shall gather their hairs on top of their heads, and officials shall wear the Wu Sha Mao (black-cloth hats), round-collar robes, belts, and black boots.

— Veritable Records of Hongwu Emperor (太祖實錄)

{{Blockquote |text=洪武元年二月壬子...至是,悉命復衣冠如唐制,士民皆束髮於頂,官則烏紗帽,圓領袍,束帶,黑靴。 On the Renzi day in the second month of the first year of Hongwu era (February 29, 1368 CE), Hongwu emperor decreed that all fashions of clothing and headwear shall be restored to the standard of Tang, all citizens shall gather their hairs on top of their heads, and officials shall wear the Wu Sha Mao (black-cloth hats), round-collar robes, belts, and black boots. |source=''Veritable Records of Hongwu Emperor'' (太祖實錄) }}

For me, it is currently displaying as:

洪武元年二月壬子...至是,悉命復衣冠如唐制,士民皆束髮於頂,官則烏紗帽,圓領袍,束帶,黑靴。 On the Renzi day in the second month of the first year of Hongwu era (February 29, 1368 CE), Hongwu emperor decreed that all fashions of clothing and headwear shall be restored to the :standard of Tang, all citizens shall gather their hairs on top of their heads, and officials shall wear the Wu Sha Mao (black-cloth hats), round-collar robes, belts, and black boots.
— Veritable Records of Hongwu Emperor (太祖實錄)

What am I doing wrong? And, more broadly, is there a change to be made so that multiline is easier to achieve, that is, without having to add |author=, |title=, |source=, or |character=? —DocWatson42 (talk) 10:54, 16 September 2025 (UTC)[reply]

Bumping. —DocWatson42 (talk) 14:31, 17 October 2025 (UTC)[reply]
|multiline= doesn't even work in the example shown in the documentation. I see "Ceci n'est pas une pipe. This is Not a Pipe." on a single line in both examples. I suspect that something in the template has changed over the years. All that parameter does now is insert a nowiki tag after the quotation. I'll poke around in the history a bit. – Jonesey95 (talk) 15:29, 17 October 2025 (UTC)[reply]
Thank you. —DocWatson42 (talk) 15:42, 17 October 2025 (UTC)[reply]
 Fixed!! I appear to have caused this problem with a recent edit to clean up semantics (see previous talk threads). It took eleven edits to the sandbox and the addition of three new testcases (there was no multiline= testcase to show me that I had broken something), but I think I solved it. The root problem is a bug, T309778, in how line breaks inside <blockquote>...</blockquote> tags are handled. I had to work around it by putting the closing blockquote tag on its own line, per mw:Help:Formatting#HTML tags. There is also a magic nowiki tag that is inserted that I didn't want to mess with. They are often required to force new lines or fix whitespace issues, so I left it in place. Report any new bugs here. – Jonesey95 (talk) 16:03, 17 October 2025 (UTC)[reply]