mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 03:20:50 +02:00
Fix confirmation for RTL overridden links
This commit is contained in:
@@ -18,6 +18,11 @@ import Foundation
|
||||
import MatrixSDK.MXLog
|
||||
|
||||
public extension NSString {
|
||||
|
||||
private enum Constants {
|
||||
static let RTLOverrideChar: String = "\u{202E}"
|
||||
}
|
||||
|
||||
/// Gets the first URL contained in the string ignoring any links to hosts defined in
|
||||
/// the `firstURLDetectionIgnoredHosts` property of `MXKAppSettings`.
|
||||
/// - Returns: A URL if detected, otherwise nil.
|
||||
@@ -63,4 +68,14 @@ public extension NSString {
|
||||
|
||||
return detectedURL
|
||||
}
|
||||
|
||||
/// Returns if the string contains an RTL override character
|
||||
@objc func mxk_containsRTLOverride() -> Bool {
|
||||
return contains(Constants.RTLOverrideChar)
|
||||
}
|
||||
|
||||
/// Returns a new string which is reversed of the receiver
|
||||
@objc func mxk_reversed() -> NSString {
|
||||
return String((self as String).reversed()) as NSString
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user