public function implodeTags(array $tags) {
		$encodedTags = [];
		foreach ($tags as $tag) {
			// Commas and quotes in tag names are special cases, so encode them.
			if (strpos($tag, ',') !== false || strpos($tag, '"') !== false) {
				$tag = '"' . str_replace('"', '""', $tag) . '"';
			}

			$encodedTags[] = $tag;
		}
		return implode(', ', $encodedTags);
	}