Sunday, 06 December 2020
  3 Replies
  846 Visits
0
Votes
Undo
I would like to report a JEvents behavior which looks like a bug to me.

After exporting an ics file from a JEvents calendar and importing it in another calender application, an entry with location "a, b" showed as "a" in the other calender application.

When inspecting the ics file, i noticed that the comma is not escaped by JEvents:


...
LOCATION:a, b
...


See https://www.ietf.org/rfc/rfc2445.txt:

A COMMA character in a
"TEXT" property value MUST be escaped with a BACKSLASH character
(US-ASCII decimal 92).


There are other characters that need escaping, and probably other fields (e.g. SUMMARY) are affected too.

Could you look into this?
4 years ago
·
#219760
0
Votes
Undo
Thanks for highlighting this - strange that it hasn't been raised as an issue before now

The fix is to change line 148-162 of components/com_jevents/views/icals/tmpl/export.php to read

if ($a->location() != "")
{
if (!is_numeric($a->location()))
{
$html .= "LOCATION:" . $this->wraplines(str_replace(array(","), array("\,"), $this->replacetags($a->location()))) . "\r\n";
}
else if (isset($a->_loc_title))
{
$html .= "LOCATION:" . $this->wraplines(str_replace(array(","), array("\,"), $this->replacetags($a->_loc_title))) . "\r\n";
}
else
{
$html .= "LOCATION:" . $this->wraplines(str_replace(array(","), array("\,"), $this->replacetags($a->location()))) . "\r\n";
}
}


JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

4 years ago
·
#219768
0
Votes
Undo
Thanks for your reply. I don't need a quick fix now, I just wanted to suggest you can check this calmly and then include in the next appropriate release.

Note that there are other characters which need escaping.

Have a good time.
4 years ago
·
#220478
0
Votes
Undo
This is coded in to the next release of JEvents - next week I hope.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.