Code

Opened 6 years ago

Closed 5 years ago

#8850 closed (wontfix)

syndication framework includes an extra newline using default templates

Reported by: hopson Owned by: nobody
Component: contrib.syndication Version: 1.0
Severity: Keywords:
Cc: Robert.Hopson@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The syndication framework default behavior is to load templates named feeds/<slug>_title.html and feeds/<slug>_description.html.

The newline at the end of these files is include in the rendered output, which for HTML doesn't really matter but could for XML. So rather than:

<title>Testo<title>

a person ends up with

<title>Testo
</title>

It is easy to fix this behavior by subclassing Feed so I'm not sure if it's a huge deal - maybe worth documenting somehow?

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by arthurk

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from SVN to 1.0

I don't see where the problem is, if you include a newline it will be output and if not then, well, not.

comment:2 Changed 6 years ago by hopson

  • Cc Robert.Hopson@… added

True, but what I'm saying is that most text editors treat that newline at the end of the file as a special case, and don't display it, and insert it automatically. So most people can ignore the fact that it's there (and do). And, it's downright difficult to get rid of, and when you do, many tools (including svn) complain about the missing newline.

And again, since it's being included in the rendered output, it is the actual data in the XML is different, and it's not immediately obvious why. In my case I was consuming the feeds in another application, and I only noticed the extra space because all comparisons based on the values of XML fields would fail.

I'm okay with this being a non-issue - it probably won't affect most people, there are several ways to work around it, and I can't think of a great way to fix or document it; I just thought I'd bring it up.

comment:3 Changed 5 years ago by jacob

  • Resolution set to wontfix
  • Status changed from new to closed

Yeah, I think it's a non-issue.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.