ladybird/AK
Diego 7560b640f3 AK: Add AllowSurrogates to UTF-8 validator
The [UTF-8](https://datatracker.ietf.org/doc/html/rfc3629#page-5)
standard says to reject strings with upper or lower surrogates. However,
in many standards, ECMAScript included, unpaired surrogates (and
therefore UTF-8 surrogates) are allowed in strings. So, this commit
extends the UTF-8 validation API with `AllowSurrogates`, which will
reject upper and lower surrogate characters.
2024-06-09 12:16:32 +02:00
..
.clang-tidy
AllOf.h
AnyOf.h
ArbitrarySizedEnum.h
Array.h AK: Add to_array() 2024-02-11 18:53:00 +01:00
Assertions.cpp
Assertions.h Everywhere: Prefer VERIFY over assert() 2024-02-05 07:03:53 -05:00
Atomic.h AK: Add workaround for faulty Sanitizer warning on gcc 13+ in Atomic 2024-04-23 15:37:07 -06:00
AtomicRefCounted.h
Badge.h
Base64.cpp AK: Reject invalid Base64 encoded string lengths 2024-03-25 08:13:27 +01:00
Base64.h AK: Add base64url encoding and decoding methods 2024-03-20 12:18:57 -04:00
BigIntBase.h AK: Move generalized internals of UFixedBigIntDivision to BigIntBase 2024-03-25 14:26:29 -06:00
BinaryHeap.h AK: Introduce IntrusiveBinaryHeap and reimplement BinaryHeap using it 2024-02-25 17:24:36 -07:00
BinarySearch.h
BitCast.h
Bitmap.h
BitmapView.h
BitStream.h AK: Add BigEndianInputBitStream::bits_until_next_byte_boundary() 2024-02-12 14:08:56 +01:00
BufferedStream.h AK: Don't move trivially copyable types in BufferedStream methods 2024-04-30 13:22:56 +02:00
BuiltinWrappers.h
BumpAllocator.h
ByteBuffer.h AK: Add XOR method to ByteBuffer 2024-04-08 09:34:49 -06:00
ByteReader.h
ByteString.cpp AK: Disallow calling ByteString methods that return a view on rvalues 2024-04-04 11:23:21 +02:00
ByteString.h AK: Disallow calling ByteString methods that return a view on rvalues 2024-04-04 11:23:21 +02:00
CharacterTypes.h AK: Add is_ascii_uppercase_hex_digit() 2024-03-01 14:17:42 +01:00
Checked.h LibJS+AK: Fix integer overflow UB on (any Int32 - -2147483648) 2024-05-18 18:11:50 +02:00
CheckedFormatString.h AK: Enable format string checking in Clang builds 2024-05-29 13:34:15 -06:00
CircularBuffer.cpp
CircularBuffer.h
CircularQueue.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
CMakeLists.txt AK: Remove various unused things 2024-06-04 09:19:39 +02:00
Complex.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Concepts.h
ConstrainedStream.cpp
ConstrainedStream.h
CountingStream.cpp
CountingStream.h
COWVector.h AK+LibRegex+LibWasm: Remove the non-const COWVector::operator[] 2024-03-12 17:10:47 +01:00
DateConstants.h
Debug.h.in Meta+AK: Clear out unused debug macro definitions 2024-06-09 10:48:19 +02:00
DefaultDelete.h
Demangle.h
DeprecatedFlyString.cpp AK+LibJS: Remove null state from DeprecatedFlyString :^) 2024-02-24 15:06:52 -07:00
DeprecatedFlyString.h AK+LibJS: Remove null state from DeprecatedFlyString :^) 2024-02-24 15:06:52 -07:00
Diagnostics.h
DisjointChunks.h
DistinctNumeric.h
DOSPackedTime.cpp
DOSPackedTime.h
DoublyLinkedList.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Endian.h ntpquery: Use AK::convert_between_host_and_network_endian 2024-02-06 04:37:47 -07:00
EnumBits.h
Enumerate.h AK: Introduce AK::enumerate 2024-03-23 09:02:58 -04:00
Error.cpp
Error.h
Find.h AK: Add missing using statements to Find.h 2024-05-06 17:32:19 +02:00
FixedArray.h AK: Don't put element count next to heap-allocated data in FixedArray 2024-05-18 18:30:42 +02:00
FixedPoint.h
FloatingPoint.h AK: Use common ComponentType integer type for float bitfields 2024-04-23 19:18:09 -06:00
FloatingPointStringConversions.cpp AK: Make BigIntBase more agnostic to non native word sizes 2024-03-25 14:26:29 -06:00
FloatingPointStringConversions.h
FlyString.cpp AK: Make FlyString::from_utf8*() avoid allocation if possible 2024-03-24 13:28:24 +01:00
FlyString.h AK: Simplify and optimize ASCIICaseInsensitiveFlyStringTraits::equals 2024-04-06 09:17:51 -04:00
Format.cpp AK: Make the :hex-dump format specifier print all characters 2024-01-21 21:13:58 +01:00
Format.h
Forward.h AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
Function.h ClangPlugins: Invert the lambda detection escape mechanism 2024-05-22 21:55:34 -06:00
GenericLexer.cpp AK+LibXML+JSSpecCompiler: Move LineTrackingLexer to AK 2024-02-16 15:26:43 +01:00
GenericLexer.h AK+LibXML+JSSpecCompiler: Move LineTrackingLexer to AK 2024-02-16 15:26:43 +01:00
GenericShorthands.h
HashFunctions.h
HashMap.h AK: Early return from empty hash table lookups to avoid hashing 2024-03-16 14:27:59 +01:00
HashTable.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Hex.cpp Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Hex.h
IDAllocator.h
InsertionSort.h
IntegralMath.h AK: Fix off by one error in integral ceil_log2() 2024-05-21 09:31:17 +02:00
IntrusiveDetails.h
IntrusiveList.h
IntrusiveListRelaxedConst.h
IntrusiveRedBlackTree.h
IPv4Address.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
IPv6Address.h
IterationDecision.h
Iterator.h
JsonArray.h
JsonArraySerializer.h
JsonObject.cpp AK+Everywhere: Remove JsonValue APIs with implicit default values 2024-01-21 15:47:53 -07:00
JsonObject.h AK: Store JsonValue's value in AK::Variant 2024-02-08 08:04:05 -07:00
JsonObjectSerializer.h
JsonParser.cpp AK: Remove ByteString from GenericLexer 2024-01-12 17:03:53 -07:00
JsonParser.h
JsonPath.cpp
JsonPath.h
JsonValue.cpp AK: Store JsonValue's value in AK::Variant 2024-02-08 08:04:05 -07:00
JsonValue.h AK: Return a constant reference from JsonValue::as_string 2024-04-04 11:23:21 +02:00
kmalloc.cpp Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
kmalloc.h
kstdio.h
LEB128.h
LexicalPath.cpp
LexicalPath.h
Math.h AK: Remove rsqrt() 2024-01-30 10:02:33 +01:00
MaybeOwned.h AK: Allow creating a MaybeOwned<Superclass> from a MaybeOwned<Subclass> 2024-03-25 20:35:00 +01:00
MemMem.h
Memory.h
MemoryStream.cpp
MemoryStream.h
NeverDestroyed.h
NoAllocationGuard.h
Noncopyable.h AK: Add AK_MAKE_DEFAULT_COPYABLE 2024-01-21 16:16:15 -07:00
NonnullOwnPtr.h AK+Kernel+LibVideo: Include workarounds for missing P0960 only in Xcode 2024-05-21 14:24:59 +02:00
NonnullRefPtr.h AK+Kernel+LibVideo: Include workarounds for missing P0960 only in Xcode 2024-05-21 14:24:59 +02:00
NumberFormat.cpp AK+Userland: Return String from human_readable_size() functions 2024-01-25 09:07:32 +01:00
NumberFormat.h AK+Userland: Return String from human_readable_size() functions 2024-01-25 09:07:32 +01:00
NumericLimits.h
Optional.h AK: Remove AK_HAS_CONDITIONALLY_TRIVIAL 2024-05-10 15:03:24 +00:00
OptionParser.cpp AK: Update OptionParser::m_arg_index by substracting skipped args 2024-02-06 00:08:30 +01:00
OptionParser.h
OwnPtr.h
Platform.h AK+Kernel+LibVideo: Include workarounds for missing P0960 only in Xcode 2024-05-21 14:24:59 +02:00
PrintfImplementation.h
Queue.h AK: Add fallible dequeue method to Queue 2024-04-19 16:38:55 -04:00
QuickSelect.h
QuickSort.h
Random.cpp Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Random.h LibTest: Add more numeric generators 2024-01-12 16:42:51 -07:00
RecursionDecision.h
RedBlackTree.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
RefCounted.h
RefPtr.h
Result.h
ReverseIterator.h
ScopedValueRollback.h
ScopeGuard.h
ScopeLogger.h
SegmentedVector.h AK+LibWeb: Use segmented vector to store commands in RecordingPainter 2023-12-30 23:02:46 +01:00
SIMD.h
SIMDExtras.h
SIMDMath.h AK: Remove the SIMD version of rsqrt() too, for good measure 2024-01-30 10:02:33 +01:00
Singleton.h
SinglyLinkedList.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
SinglyLinkedListSizePolicy.h
SipHash.cpp
SipHash.h
SourceGenerator.h
SourceLocation.h
Span.h AK: Generalize Span::contains_slow to use the Traits infrastructure 2024-03-16 08:42:33 +01:00
Stack.h
StackInfo.cpp AK: Add stack size fixup for musl libc 2024-05-14 13:56:45 -06:00
StackInfo.h
StackUnwinder.h AK: Add a function for frame pointer-based stack unwinding 2024-05-14 14:02:06 -06:00
Statistics.h AK: Export Statistics to the global namespace 2024-05-18 18:30:07 +02:00
StdLibExtraDetails.h Everywhere: Run clang-format 2024-04-24 16:50:01 -04:00
StdLibExtras.h AK: Make ceil_div() handle one argument being negative correctly 2024-04-27 07:09:08 +02:00
Stream.cpp
Stream.h AK: Add a Stream::write_until_depleted overload for string types 2024-04-04 11:23:21 +02:00
String.cpp AK: Check for u32 overflow in String::repeated() 2024-05-07 09:15:40 +02:00
String.h AK+LibUnicode: Implement a case-insensitive variant of find_byte_offset 2024-06-01 07:37:54 +02:00
StringBase.cpp AK: Remove excessive hashing caused by FlyString table 2024-03-24 13:28:24 +01:00
StringBase.h AK: Remove excessive hashing caused by FlyString table 2024-03-24 13:28:24 +01:00
StringBuilder.cpp LibWeb: Skip some redundant UTF-8 validation in CSS tokenizer 2024-03-24 13:28:24 +01:00
StringBuilder.h LibWeb: Skip some redundant UTF-8 validation in CSS tokenizer 2024-03-24 13:28:24 +01:00
StringData.h AK: Remove excessive hashing caused by FlyString table 2024-03-24 13:28:24 +01:00
StringFloatingPointConversions.cpp
StringFloatingPointConversions.h
StringHash.h
StringImpl.cpp
StringImpl.h
StringUtils.cpp AK: Improve performance of StringUtils::find_last 2024-01-04 11:28:03 -05:00
StringUtils.h
StringView.cpp AK: Add a StringView method to count the number of lines in a string 2024-03-08 14:43:33 -05:00
StringView.h AK: Add a StringView method to count the number of lines in a string 2024-03-08 14:43:33 -05:00
TemporaryChange.h
Time.cpp
Time.h Everywhere: Remove 'clang-format off' comments that are no longer needed 2024-04-24 16:50:01 -04:00
Traits.h AK: Don't blindly use SipHash as default hash function 2024-03-25 12:39:23 +01:00
Trie.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Try.h
Tuple.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
TypeCasts.h
TypedTransfer.h
TypeList.h AK: Make IndexSequence use size_t 2024-02-11 18:53:00 +01:00
Types.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
UFixedBigInt.h Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
UFixedBigIntDivision.h AK: Move generalized internals of UFixedBigIntDivision to BigIntBase 2024-03-25 14:26:29 -06:00
UnicodeUtils.h AK: Stop using ShortString in String::from_code_point 2024-01-21 16:16:15 -07:00
Utf8View.cpp AK: Add ASCII fast path to Utf8CodePointIterator 2023-12-30 13:49:50 +01:00
Utf8View.h AK: Add AllowSurrogates to UTF-8 validator 2024-06-09 12:16:32 +02:00
Utf16View.cpp AK: Add AllowSurrogates to UTF-8 validator 2024-06-09 12:16:32 +02:00
Utf16View.h Everywhere: Run clang-format 2024-04-24 16:50:01 -04:00
Utf32View.cpp
Utf32View.h
UUID.cpp AK+Userland: Remove some needlessly explicit conversions to StringView 2024-04-04 11:23:21 +02:00
UUID.h
Variant.h AK: Remove AK_HAS_CONDITIONALLY_TRIVIAL 2024-05-10 15:03:24 +00:00
Vector.h AK+LibJS: Remove OFFSET_OF and its users 2024-02-29 09:00:00 +01:00
Weakable.h AK+LibJS: Remove OFFSET_OF and its users 2024-02-29 09:00:00 +01:00
WeakPtr.h