Skip to content

Commit 2d40b76

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents cb768a1 + 9cedc0f commit 2d40b76

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ This repository contains Aspose.Words Cloud SDK for Swift source code. This SDK
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 25.6
17+
18+
- Added support for SVG images format in Watermark API.
19+
- Added 'RemoveJavaScriptFromLinks' property for HtmlSaveOptionsData class.
20+
21+
1622
## Enhancements in Version 25.5
1723

1824
- Added data models support for classes 'CommentRangeStart', 'CommentRangeEnd'.
@@ -391,7 +397,7 @@ Add link to this repository as dependency to your Package.swift:
391397

392398
dependencies: [
393399
// Dependencies declare other packages that this package depends on.
394-
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git", from: "25.5")
400+
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git", from: "25.6")
395401
],
396402
targets: [
397403
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@@ -409,7 +415,7 @@ targets: [
409415
Add link to git repository as dependency to your Podfile:
410416

411417
```ruby
412-
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '25.5'
418+
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '25.6'
413419
```
414420

415421
## Getting Started

Sources/AsposeWordsCloud/Api/Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,6 @@ public class Configuration : Codable {
187187

188188
// Returns SDK version for using in statistics headers
189189
public func getSdkVersion() -> String {
190-
return "25.5";
190+
return "25.6";
191191
}
192192
}

Sources/AsposeWordsCloud/Model/HtmlSaveOptionsData.swift

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,18 @@ public class HtmlSaveOptionsData : SaveOptionsData {
539539
}
540540
}
541541

542+
// Field of removeJavaScriptFromLinks. Container class for html save options.
543+
private var _removeJavaScriptFromLinks : Bool? = nil;
544+
545+
public var removeJavaScriptFromLinks : Bool? {
546+
get {
547+
return self._removeJavaScriptFromLinks;
548+
}
549+
set {
550+
self._removeJavaScriptFromLinks = newValue;
551+
}
552+
}
553+
542554
// Field of replaceBackslashWithYenSign. Container class for html save options.
543555
private var _replaceBackslashWithYenSign : Bool? = nil;
544556

@@ -654,6 +666,7 @@ public class HtmlSaveOptionsData : SaveOptionsData {
654666
case metafileFormat = "MetafileFormat";
655667
case officeMathOutputMode = "OfficeMathOutputMode";
656668
case prettyFormat = "PrettyFormat";
669+
case removeJavaScriptFromLinks = "RemoveJavaScriptFromLinks";
657670
case replaceBackslashWithYenSign = "ReplaceBackslashWithYenSign";
658671
case resolveFontNames = "ResolveFontNames";
659672
case resourceFolder = "ResourceFolder";
@@ -723,6 +736,7 @@ public class HtmlSaveOptionsData : SaveOptionsData {
723736
}
724737

725738
self.prettyFormat = json["PrettyFormat"] as? Bool;
739+
self.removeJavaScriptFromLinks = json["RemoveJavaScriptFromLinks"] as? Bool;
726740
self.replaceBackslashWithYenSign = json["ReplaceBackslashWithYenSign"] as? Bool;
727741
self.resolveFontNames = json["ResolveFontNames"] as? Bool;
728742
self.resourceFolder = json["ResourceFolder"] as? String;
@@ -770,6 +784,7 @@ public class HtmlSaveOptionsData : SaveOptionsData {
770784
self.metafileFormat = try container.decodeIfPresent(MetafileFormat.self, forKey: .metafileFormat);
771785
self.officeMathOutputMode = try container.decodeIfPresent(OfficeMathOutputMode.self, forKey: .officeMathOutputMode);
772786
self.prettyFormat = try container.decodeIfPresent(Bool.self, forKey: .prettyFormat);
787+
self.removeJavaScriptFromLinks = try container.decodeIfPresent(Bool.self, forKey: .removeJavaScriptFromLinks);
773788
self.replaceBackslashWithYenSign = try container.decodeIfPresent(Bool.self, forKey: .replaceBackslashWithYenSign);
774789
self.resolveFontNames = try container.decodeIfPresent(Bool.self, forKey: .resolveFontNames);
775790
self.resourceFolder = try container.decodeIfPresent(String.self, forKey: .resourceFolder);
@@ -880,6 +895,9 @@ public class HtmlSaveOptionsData : SaveOptionsData {
880895
if (self.prettyFormat != nil) {
881896
try container.encode(self.prettyFormat, forKey: .prettyFormat);
882897
}
898+
if (self.removeJavaScriptFromLinks != nil) {
899+
try container.encode(self.removeJavaScriptFromLinks, forKey: .removeJavaScriptFromLinks);
900+
}
883901
if (self.replaceBackslashWithYenSign != nil) {
884902
try container.encode(self.replaceBackslashWithYenSign, forKey: .replaceBackslashWithYenSign);
885903
}
@@ -1303,6 +1321,18 @@ public class HtmlSaveOptionsData : SaveOptionsData {
13031321
}
13041322

13051323

1324+
// Sets removeJavaScriptFromLinks. Gets or sets the flag that indicates whether JavaScript will be removed from links. Default is false. If this option is enabled, all links containing JavaScript (e.g., links with "javascript:" in the href attribute) will be replaced with "javascript:void(0)". This can help prevent potential security risks, such as XSS attacks.
1325+
public func setRemoveJavaScriptFromLinks(removeJavaScriptFromLinks : Bool?) -> HtmlSaveOptionsData {
1326+
self.removeJavaScriptFromLinks = removeJavaScriptFromLinks;
1327+
return self;
1328+
}
1329+
1330+
// Gets removeJavaScriptFromLinks. Gets or sets the flag that indicates whether JavaScript will be removed from links. Default is false. If this option is enabled, all links containing JavaScript (e.g., links with "javascript:" in the href attribute) will be replaced with "javascript:void(0)". This can help prevent potential security risks, such as XSS attacks.
1331+
public func getRemoveJavaScriptFromLinks() -> Bool? {
1332+
return self.removeJavaScriptFromLinks;
1333+
}
1334+
1335+
13061336
// Sets replaceBackslashWithYenSign. Gets or sets the flag that indicates whether backslash characters should be replaced with yen signs. Default value is false. By default, Aspose.Words mimics MS Word's behavior and doesn't replace backslash characters with yen signs in generated HTML documents. However, previous versions of Aspose.Words performed such replacements in certain scenarios. This flag enables backward compatibility with previous versions of Aspose.Words.
13071337
public func setReplaceBackslashWithYenSign(replaceBackslashWithYenSign : Bool?) -> HtmlSaveOptionsData {
13081338
self.replaceBackslashWithYenSign = replaceBackslashWithYenSign;

0 commit comments

Comments
 (0)