Skip to content

Commit

Permalink
Merge branch 'develop' into devsecops
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-ivanov committed Dec 25, 2024
2 parents 9eeb7c2 + 5801648 commit 6b89e08
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public virtual void NormalConvertPtsToPxTest() {
}

[NUnit.Framework.Test]
public virtual void NormalizeProperty() {
public virtual void NormalizePropertyTest() {
NUnit.Framework.Assert.AreEqual("part1 part2", CssUtils.NormalizeCssProperty(" part1 part2 "));
NUnit.Framework.Assert.AreEqual("\" the next quote is ESCAPED \\\\\\\" still IN string \"", CssUtils.NormalizeCssProperty
("\" the next quote is ESCAPED \\\\\\\" still IN string \""));
Expand All @@ -117,6 +117,9 @@ public virtual void NormalizeProperty() {
));
}

[LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.URL_IS_NOT_CLOSED_IN_CSS_EXPRESSION
)]
[LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.URL_IS_EMPTY_IN_CSS_EXPRESSION)]
[NUnit.Framework.Test]
public virtual void NormalizeUrlTest() {
NUnit.Framework.Assert.AreEqual("url(data:application/font-woff;base64,2CBPCRXmgywtV1t4oWwjBju0kqkvfhPs0cYdMgFtDSY5uL7MIGT5wiGs078HrvBHekp0Yf=)"
Expand All @@ -128,6 +131,8 @@ public virtual void NormalizeUrlTest() {
));
NUnit.Framework.Assert.AreEqual("url(haveEscapedEndBracket\\))", CssUtils.NormalizeCssProperty("url( haveEscapedEndBracket\\) )"
));
NUnit.Framework.Assert.AreEqual("url(", CssUtils.NormalizeCssProperty("url(https://example.com/"));
NUnit.Framework.Assert.AreEqual("url(", CssUtils.NormalizeCssProperty("url("));
}

[NUnit.Framework.Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private static int AppendQuotedString(StringBuilder buffer, String source, int s
/// <param name="start">where to start in the source. Should point at first symbol after "url(".</param>
/// <returns>the new position in the source</returns>
private static int AppendUrlContent(StringBuilder buffer, String source, int start) {
while (iText.IO.Util.TextUtil.IsWhiteSpace(source[start]) && start < source.Length) {
while (start < source.Length && iText.IO.Util.TextUtil.IsWhiteSpace(source[start])) {
++start;
}
if (start < source.Length) {
Expand Down
2 changes: 1 addition & 1 deletion port-hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c41c5463f9c1c2f692e5e2e5259d07122440bfc3
8dd0cafd0d2fb3671f49eb5c633291df2f862b8f

0 comments on commit 6b89e08

Please sign in to comment.