def to_matrix_properties(hash = {})
      properties = hash.map do |k, v|
        key   = CGI.escape(k.to_s)
        value = CGI.escape(v.to_s)

        "#{key}=#{value}"
      end

      if properties.empty?
        nil
      else
        ";#{properties.join(';')}"
      end
    end
def to_matrix_properties(hash = {})
      properties = hash.map do |k, v|
        key   = CGI.escape(k.to_s)
        value = CGI.escape(v.to_s)

        "#{key}=#{value}"
      end

      if properties.empty?
        nil
      else
        ";#{properties.join(';')}"
      end
    end
Create CGI-escaped string from matrix properties

 @see http://bit.ly/1qeVYQl