EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Recent Posts

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Re: Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 02:09:24 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:55:53 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 01:47:42 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:34:07 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 12:20:17 pm

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Recent Topics ezBlock

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Where is the facebook button color? by EzPortal
February 28, 2023, 06:45:09 pm

Display on Mobile - SMF 2.1.3 and EZ 5.5.2 by BugginIn
December 29, 2022, 04:07:13 pm

Blocks Help by Riggs1973
November 20, 2022, 12:59:30 pm

Surface ol lite theme release Free! by Steffen K.
November 18, 2022, 03:57:24 am

Undefined index: href by EzPortal
October 04, 2022, 08:49:59 pm

SMF-ezportal_column_5.cache): failed to open stream: No such file or directory by EzPortal
June 04, 2022, 11:40:13 am

Arcade block error: failed to open stream: No such file or directory by Shades
May 20, 2022, 02:47:13 pm

Author Topic: RSS Block - Entity encoding  (Read 6930 times)

0 Members and 1 Guest are viewing this topic.

Offline Analogiker

  • Posts: 2
  • Karma: 0
    • Cachebrett.de
RSS Block - Entity encoding
« on: September 30, 2009, 03:08:58 am »
If a RSS feed(title, desc, link) contains not encoded html entities, the sax parser gets an error.

Solution (php4/5):

 * add '$data = htmlentities($data, ENT_QUOTES, "UTF-8", false);' to function ezportal_characterData1 in Subs-EzPortalRSS2.php

Code: [Select]
function ezportal_characterData1($parser, $data)
 {
global $insideitem, $tag,  $feedcount, $context, $maxitemcount;


if ($insideitem && $feedcount < $maxitemcount)
  {
$data = htmlentities($data, ENT_QUOTES, "UTF-8", false);

switch ($tag)
{
case "TITLE":
$context['feeditems'][$feedcount]['title'] .= $data;
break;

case "DESCRIPTION":
$context['feeditems'][$feedcount]['description'] .= $data;
break;

case "LINK":
$context['feeditems'][$feedcount]['link'] .= $data;
break;
}
}
}

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: RSS Block - Entity encoding
« Reply #1 on: September 30, 2009, 05:46:51 pm »
Hmm maybe an option would be best I could see people trying to an rss feed of images which would contain html code to display the images.
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

Offline Analogiker

  • Posts: 2
  • Karma: 0
    • Cachebrett.de
Re: RSS Block - Entity encoding
« Reply #2 on: October 14, 2009, 05:15:11 am »
I subscribed this feed. Sometimes there are embedded images

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: RSS Block - Entity encoding
« Reply #3 on: October 14, 2009, 06:49:26 am »
And wouldn't htmlentities break those images?
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
7671 Views
Last post December 17, 2008, 07:10:57 pm
by EzPortal
1 Replies
8494 Views
Last post April 02, 2009, 01:05:51 pm
by Sam
2 Replies
12624 Views
Last post July 14, 2009, 02:36:31 pm
by EzPortal
4 Replies
11326 Views
Last post January 10, 2010, 06:58:14 pm
by liza095
9 Replies
14765 Views
Last post February 04, 2012, 12:59:13 am
by Retrouser

+-SMF Gallery

Quick Menu


Powered by EzPortal