Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The RSS notifier does not quote special characters in the feed URL #2801

Closed
michaelrsweet opened this issue Apr 14, 2008 · 2 comments
Closed
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.3-current
CUPS.org User: mike

The RSS notifier does not quote the feed URL in the .rss file it creates. This prevents RSS feeds with &, <, or > in the name from working.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"str2801.patch":

Index: notifier/rss.c

--- notifier/rss.c (revision 7446)
+++ notifier/rss.c (working copy)
@@ -579,6 +579,7 @@
FILE fp; / File pointer _/
cups_rss_t *msg; / Current message /
char date[1024]; /
Current date */

  • char href; / Escaped base URL */

if ((fp = fopen(filename, "w")) == NULL)
@@ -592,7 +593,11 @@
fputs("<rss version="2.0">\n", fp);
fputs(" \n", fp);
fputs(" <title>CUPS RSS Feed</title>\n", fp);

  • fprintf(fp, " %s\n", baseurl);
  • href = xml_escape(baseurl);
  • fprintf(fp, " %s\n", href);
  • free(href);

fputs(" CUPS RSS Feed\n", fp);
fputs(" " CUPS_SVERSION "\n", fp);
fputs(" 1\n", fp);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant