Commit Graph

13 Commits

Author SHA1 Message Date
Shannon
a603fd0c46 Merge branch 'TEMP-u4-10135' of https://github.com/umbraco/Umbraco-CMS into TEMP-u4-10135
# Conflicts:
#	src/Umbraco.Web/HtmlStringUtilities.cs
2017-09-06 10:05:00 +10:00
Shannon
4b5c49907c switches to constant - comments out what seems to be a totally unused variable 2017-09-06 10:01:39 +10:00
Robert
972d5f8296 Reverted back to last commit, invalid html check added 2017-09-03 21:17:53 +02:00
Robert
73937172dc Added check for invalid HTML and sanitization on said HTML
Added HtmlSanitization package
Added check for invalid HTML and sanitization on WordsToLength and Truncate methods
Addes some extra comments
2017-08-31 11:43:06 +02:00
Robert
8c1996a7a1 Changed from the String object qualifier to type qualifier 2017-08-31 09:15:02 +02:00
Robert
039ab8f1d2 Null check for firstTrim added and fixed typo 2017-08-30 09:18:45 +02:00
Robert
68fd74897f Replaced the Regex parse with HtmlAgilityPack parser 2017-08-28 10:52:53 +02:00
Robert
047a41c05e Having a space in a tag is now taken as a char length and not as a space between words 2017-08-28 10:14:16 +02:00
Robert
84f684ed31 Truncate with trimming should now work, added some mpore tests for truncate by words methods
Fix: Original Truncate method show now be able to trim
Add: Added some more tests for Truncate by words to cater for tagsAsContent parameter
Fix: In original truncate, currentTextLength prop will be increased everytime a tag is added, this will fix an issue when tagsAsContent is set to true (it would have added an extra char per tag, which would have went over to the next word)
2017-08-25 11:39:13 +02:00
Robert
54f86c06f0 Fix TruncateByWords to work with tags 2017-08-21 12:30:16 +02:00
Robert
769f0d97d2 Added TruncateByWords method + overloads 2017-07-12 10:35:09 +02:00
Lotte Pitcher
c8b23195f6 When truncating if the last characters was the first half of a two word unicode character, also include the second half to avoid YSOD 2016-11-03 14:30:38 +00:00
Shannon
c760a7c50d Merge branch 'dev-v7-7.3.0-UmbHelperInterfaces' of https://github.com/Shazwazza/Umbraco-CMS into Shazwazza-dev-v7-7.3.0-UmbHelperInterfaces
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
2015-02-18 17:14:55 +01:00