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

Only getting 63 Chars from $event['DESCRIPTION'] #19

Open
calciummen opened this issue Oct 17, 2016 · 3 comments
Open

Only getting 63 Chars from $event['DESCRIPTION'] #19

calciummen opened this issue Oct 17, 2016 · 3 comments

Comments

@calciummen
Copy link

I only getting the first 63 characters of the description field in the ics file while there are more then 63

@bars38
Copy link

bars38 commented Aug 27, 2020

the same problem...

@bars38
Copy link

bars38 commented Aug 27, 2020

Solution:

file: class.iCalReader.php
you need to find function:

    public function keyValueFromString($text) 
    {
        preg_match("/([^:]+)[:]([\w\W]*)/", $text, $matches);
        if (count($matches) == 0) {
            return false;
        }

        $matches = array_splice($matches, 1, 2);
        return $matches;
    }

and change it to:

    public function keyValueFromString($text) 
    {
        preg_match("/([^:]+)[:]([\w\W]*)/", $text, $matches);
        if (substr($text, 0, 1) === " "){
            return false;
        }
        if (count($matches) == 0) {
            return false;
        }

        $matches = array_splice($matches, 1, 2);
        return $matches;
    }

@bars38
Copy link

bars38 commented Aug 27, 2020

also find and comment

            foreach ($lines as $line) {
                //$line = trim($line);
                $add  = $this->keyValueFromString($line);
                if ($add === false) {
                    $line = substr($line, 1);

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

No branches or pull requests

2 participants