* context direction, when needed, to prevent the possible garbling
* of whatever may follow {@code str}
* @return Input string after applying the above processing.
*/
protected String spanWrapBase(String str, boolean isHtml, boolean dirReset) {
Direction dir = BidiUtils.get().estimateDirection(str, isHtml);
return spanWrapWithKnownDirBase(dir, str, isHtml, dirReset);
}