diff --git a/src/IDF/Plugin/SyncGit/Cron.php b/src/IDF/Plugin/SyncGit/Cron.php index e11336c..3f83deb 100644 --- a/src/IDF/Plugin/SyncGit/Cron.php +++ b/src/IDF/Plugin/SyncGit/Cron.php @@ -51,7 +51,7 @@ class IDF_Plugin_SyncGit_Cron foreach ($keys as $key) { if (strlen($key->content) > 40 // minimal check and preg_match('/^[a-zA-Z][a-zA-Z0-9_.-]*(@[a-zA-Z][a-zA-Z0-9.-]*)?$/', $key->login)) { - $content = str_replace("\n", '', $key->content); + $content = trim(str_replace(array("\n", "\r"), '', $key->content)); $out .= sprintf($template, $cmd, $key->login, $content)."\n"; } }