Making WordPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1342 closed defect (bug) (invalid)

Plugin directory cuts out HTML <tags> in readme.txt indended to be part of text

Reported by: maratbn's profile maratbn Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

I just published a new plugin that injects an HTML tag into document <head>, and I documented which tag it injects in the 'readme.txt' under the section 'Technical Summary'. The sentence is:

"Plugin works by hooking-in special logic into the action 'wp_head' to inject the tag <meta name='robots' content='...'> with restriction directives for the specified pages and posts."

You can see the raw 'readme.txt' here:

https://raw.githubusercontent.com/maratbn/RobotsWhiz/master--release--0.2/readme.txt

However, the plugin's page at 'https://wordpress.org/plugins/robotswhiz/' just says "...the tag with restriction directives...".

So the textual description of the <tag> got omitted. I think this was intended to prevent malicious injection of HTML logic into the page, but I wanted for this to be shown as text rather than get processed as raw HTML. The plugin directory logic should just escape the '<' and '>' characters into their HTML entities &lt; and &gt; and show the text.

One workaround might be to just place these entities into 'readme.txt', but that would not be technically correct, as that's a text file, not an HTML file.

The HTML-like text should be escaped on the directory site just before it is rendered.

Change History (3)

#1 @maratbn
9 years ago

  • Cc maratbn@… added

#2 @iandunn
9 years ago

  • Component changed from General to Plugin Directory
  • Resolution set to invalid
  • Status changed from new to closed

Hi, you can wrap the tags in backticks -- the ` key to the left of the 1 key -- to avoid them being stripped out.

The sample readme has a few examples that you can look at.

#3 @maratbn
9 years ago

Tried the backticks and they do work even though the text enclosed within them is styled differently.

Just for the record, I think backticks are useful in case it is desired to have the special styling, but tags without the backticks should still be supported.

Note: See TracTickets for help on using tickets.