
xyz.jpenilla.squaremap.api.HtmlStripper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of squaremap-api Show documentation
Show all versions of squaremap-api Show documentation
API for extending squaremap, a minimalistic and lightweight world map viewer for Minecraft servers
package xyz.jpenilla.squaremap.api;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.framework.qual.DefaultQualifier;
import org.jetbrains.annotations.ApiStatus;
/**
* Strips HTML tags from text. Allows sanitizing untrusted strings before use in
* marker tooltips.
*
* @since 1.2.0
*/
@DefaultQualifier(NonNull.class)
public interface HtmlStripper {
/**
* Get an {@link HtmlStripper}.
*
* @return HTML stripper
*/
static HtmlStripper htmlStripper() {
return ProviderHolder.HTML_STRIPPER.instance();
}
/**
* Strips HTML tags from the provided string.
*
* @param string untrusted string
* @return sanitized string
*/
String stripHtml(String string);
@ApiStatus.Internal
interface Provider {
HtmlStripper instance();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy