Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

What are the formatting rules for the "Title" of posts?

by kcott (Archbishop)
on Jun 20, 2021 at 00:06 UTC ( [id://11134047]=monkdiscuss: print w/replies, xml ) Need Help??

G'day All,

I had some problems with the rendering of the title of a post. I can't find any specific information: Super Search with keywords like title is not particularly useful. I suspect this may be documented somewhere; I hoping someone can point me to that.

The specific problem occurred with "Re^2: @ARGV ignores quotes [ZERO WIDTH SPACE]". That node's title currently renders as: Re^2: @ARGV ignores quotes [ZERO WIDTH SPACE].

Originally, the end of that was [​] which rendered as: Re^2: @ARGV ignores quotes [].

I didn't think that entity references were honoured in titles; however, this indicated I was wrong (or so I believed). I thought that would be an easy fix and changed the end part to [​]; but that rendered as: Re^2: @ARGV ignores quotes [​].

As I couldn't work out the apparently contradictory behaviour, I simply took a pragmatic approach and changed the end to [ZERO WIDTH SPACE] (its current value).

Any help with this would be appreciated.

— Ken

Replies are listed 'Best First'.
Re: What are the formatting rules for the "Title" of posts? (​) (updated)
by LanX (Saint) on Jun 20, 2021 at 10:03 UTC
    Usingen square brackets in titles is not a good idea. Use round ones like I did.

    The monastery is not consistent here, they might be rendered as links when the titles are listed elsewhere.

    I think you've been bitten by side effects meant to avoid this.

    Now trying: (​)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    Update

    For clarification: a title is supposed to be verbatim like a code section.

    That means escaping of any

    • HTML markup <tag>
    • HTML entities &...;
    • PM link syntax []

    Unfortunately and inconsistently are node titles sometimes listed in templates without escaping these markups <>&[] leading to false interpretation.

    Even the documentation here is misleading, like one help node suggesting to introduce [OT] for off topic title.

      Ok while my title rendered fine in RAT and previews it fails in thread view when opening the OP.

      Call it a bug and avoid entities in titles.

      Now trying: (&#38;#8203;)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        Just a test with all variations of brackets, parentheses, and & forms:

        [&#38;#8203;] [&#x26;#8203;] [&amp;#8203;] (&#38;#8203;) (&#x26;#8203; +) (&amp;#8203;)

        Preview shows exactly the same as shown in the <code> block above. Now let's see what happens when I post this.

        Update after posting: What I saw in Preview is exactly the same as I now see in the individual node, the entire thread, Newest Nodes, and RAT.

        Update after looking more closely: Sorry, what I said in the last update about the "the entire thread" is incorrect. When I look at the whole thread, all the various & references are resolved; giving this title:

        Re^3: What are the formatting rules for the "Title" of posts? [&#8203; +] [&#8203;] [&#8203;] (&#8203;) (&#8203;) (&#8203;)

        — Ken

        TEST (&amp; &#38; <b>B</b> [lanx]) (& & B lanx))

        update

        as we can see are entities and html-tags not escaped, if a title is displayed as reply in a thread:

        Like in the Re:^4 shown beneath this node as


        Re^4: What are the formatting rules for the "Title" of posts? (TEST & & B [lanx]) [id://11134082]
        by LanX on Jun 20, 2021 at 21:32 CEST

        But it should show:


        Re^4: What are the formatting rules for the "Title" of posts? (TEST &amp; &#38; <b>B</b> [lanx]) [id://11134082]
        by LanX on Jun 20, 2021 at 21:32 CEST

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

      G'day Rolf,

      Thanks for the feedback and various test examples.

      I'll aim to reply to everything here to avoid instances of one of us posting while the other is composing (e.g. the nodes 11134079link and 11134080link). It also keeps everything together instead of bits scattered throughout the thread.

      As far as I know, I've always used [...] without any problems or comment on this usage. I noted your test with [lanx] didn't generate an additional link in the title.

      There are clearly inconsistencies between the rendering of titles on various pages: even a single node's title can look different when viewed in its thread or by itself.

      Thanks for taking the time to commit a patch. Unfortunately, I get "Tough beans." (permission denied) so I can't comment further on that.

      If the issues can't be easily resolved — due to code complexity, testing difficulties, etc. — perhaps a documentation page with basic instructions could at least help to avoid the problems. I'm thinking along the lines of: don't include markup; don't use entities; and so on.

      — Ken

        Hello Ken,

        > perhaps a documentation page with basic instructions could at least help to avoid the problems

        It's a certainly a bug and must be fixed ASAP ...

        Thanks for reporting! :)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://11134047]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-23 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found