Skip to content

Tags can only be one word #118

Description

@pennal

If one of the tags has a space, or any other character other than letters and numbers, the tags are not applied AT ALL to the droplet on creation.

When the tags are just one word then all the tags are successfully applied. If even one of them contains a space then ALL of the tags are not applied.

I tried encoding the values using URLEncoder.encode(tag, StandardCharsets.UTF_8) but it does not help.

Very minimal example:

// setup
Client client = new DigitalOceanClient("XXXXXX");
Region region = // slug=fra1
Size size = // slug=s-1vcpu-1gb
Image image = // slug=docker-18-04

// Droplet creation
Droplet droplet = new Droplet();
droplet.setName("test-tags");
droplet.setRegion(region);
droplet.setSize(slug);
droplet.setImage(image);

// Works
List<String> tags = List.of("tag1", "tag2");

// Does not work
List<String> tags = List.of("tag 1", "tag 2");


droplet.setTags(tags);
client.createDroplet(droplet);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions