Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static Hyperlink create(final String value, final int pos) {
}
final String target = nextToken(value, index, '<', '>');
hyperlink = new Builder()
.text(text)
.text(decode(text))
.href(decode(href))
.type(type)
.target(target)
Expand Down Expand Up @@ -125,20 +125,9 @@ private static String nextToken(final String value,
return null;
}

// private static void throwException(final String value,
// final int pos,
// final char startChar,
// final char endChar) throws MalformedLinkException {
// throw new MalformedLinkException("Invalid required token in value '" + value
// + "', pos: " + pos
// + ", startChar: '" + startChar
// + "' endChar: '" + endChar + "'");
// }

public String getText() {
// Why are we decoding the plain text part?
return text;
// return text;
}

public String getHref() {
Expand Down Expand Up @@ -213,7 +202,7 @@ public String toString() {
final StringBuilder sb = new StringBuilder();
if (text != null) {
sb.append("[");
sb.append(text);
sb.append(encode(text));
sb.append("]");
}
if (href != null) {
Expand Down
68 changes: 68 additions & 0 deletions unreleased_changes/20260128_154859_690__5234.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
* Bug **#5234** : Fix spaces in `createAnnotatioh()` function link text.


```sh
# ********************************************************************************
# Issue number: 5234
# Issue title: createAnnotation() converts spaces to `+` for the text parameter
# Issue tags: f:Annotations, p:high
# Issue link: https://github.com/gchq/stroom/issues/5234
# ********************************************************************************

# ONLY the top line will be included as a change entry in the CHANGELOG.
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
# 'Fixed nasty bug'.
#
# Examples of acceptable entries are:
#
#
# * Bug **#123** : Fix bug with an associated GitHub issue in this repository.
#
# * Bug **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository.
#
# * Feature **#789** : Add new feature X.
#
# * Bug : Fix bug with no associated GitHub issue.
#
#
# Note: The line must start '* XXX ', where 'XXX' is a valid category,
# one of [Bug Feature Refactor Dependency Build].


# --------------------------------------------------------------------------------
# The following is random text to make this file unique for git's change detection
# HUEdjqogF0mcjLfAZjwJrsLO4y8m81ARhUrdJfhLwTAbVjKCRyijR6FE5ZNQHfstllHB253FwBRakRYD
# dqYrxmrH8NAsIIYymuztsQ9f62rnT3BNgNmGFd2BYGEYjt7YyUmGu0Eg1VUuln7x6d2HM6rC7j19gk74
# VmH4xN8YzPDsx38fL7uUb8jjoFTJx05C5sUx7NZZpNn3RGFJR96aY5fCpI32yEmKxKTgqfZ6hdg99kHT
# JluLCE6dDa9lrojss2Bnn1KDU1nwTEIflK3QxUZfc1sRr2OU5KVjxmGELCN2N9rdZFDKCfoKxZVLzMXB
# sqAhSWj2NJPzAfTzMgtaKdH6GSnhPMhZyQ2P2zY5YLoMzdXzZKqxGkQLDFKInsfPgtIENTigoHXCkVtr
# sZcSl1dubUwnPYpdfE4tjgMT5JabElLqBi3jM0oDJNNYToVAa6RWsMMIOMp5cPzzkXxtXI4UGIwqKJYH
# 49X3vMvijMosMnz7G0fcjI6WDalBAhubFgmoT6sxFMiChazWc3akjZVZvfbcdo4ITP5GaK4m0zMiaQSh
# jVy0ZfnNB3sPXDx79AiSYbkCKRaKESyTYvHrwoKjAgLlTYOQ5kTXAqEeaVhBManEigdjTYHQmWind6xK
# rz9qkr8ahs7r9pxQ9RGavfzIvP8UdACx4bRawXlXanWhyJ7OHOVe5afma0Jxd4gbpIkAy1UP2ts0y6AQ
# 8X5ja8vkTZEoBhO1Kz5NLtZg4cjIba7S5yQpvSTbai51RkC6WLtCfAk4GnpblO0e5grcTpLNNWCwLIGH
# ShqXLnwK6eAqd5D4ulzgsykCBu51CwBKELIil9ep0xsz68WFxWEqFCVmbSpBsC6sSdfTyYvbnO1jYv28
# jp0ml4vhZcnnpqQXHBwHD75vMm7PS0hNw7XGLorpvyhlq9UYU8SpnCnbhQy5OecyiZHWLEfgH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v4n
# 73g5OO7APIDsG7f9PgyCPRgrUcnu7EaOYkZjHl3G3Hpu8U65qzikpJPEyMlMtZGp5V5CSZdvTO8koXoF
# k3HEGxGBIbrsrsfj3OGtPbV1pj0cxT2b0DVEwIkgUPko73YQRkmTFA6b6cj1sIE0XKAzB7VtSBz4M4ca
# IDUVQWGr84CBm6jPAxJiTtDGvlOVZll7kCrziMOpsYqgPbR52qrwXv6wOHpQoIBgpM5ukAmOH3Mw4GVV
# aCjgmrY2X2mwXC3uPUb4ZPG4EFwYFhUZJYzmgFPIvevCaghX0taeyzbSuCcedrP0u88JCBDTrUEtMPzM
# Jy2dS9RJMQcsozEz8S6H5x7jInkX62ptLIKKFhZEUBIPboq6KLg7UZGHQuwR1cNS4cxPgIzcl9Z8sGCY
# --------------------------------------------------------------------------------

```