diff --git a/appveyor.yml b/appveyor.yml index 9dba34e..1b13da7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,10 +4,8 @@ image: Visual Studio 2017 environment: access_token: secure: Eq6BjtZ80BXKLwFMg76IjuQAvbLjbojIF/X/ARouGVhxPneJtgDfCXMPNgJ7KBKq - CoverityProjectToken: - secure: pUUrynbyxCRpsAgGdKBVYDZCilwBmaWQ1Jg+rg5znr0= - CoverityNotificationEmail: - secure: m/ox72HU97EeJExWEFWx+0M9uov0cydn6E8mSaQzsQE= +nuget: + disable_publish_on_pr: true build_script: - ps: (Get-Content src\HtmlSanitizer\HtmlSanitizer.csproj).Replace("1.0.0-VERSION", $env:APPVEYOR_BUILD_VERSION) | Set-Content src\HtmlSanitizer\HtmlSanitizer.csproj - dotnet restore @@ -21,9 +19,12 @@ test_script: artifacts: - path: 'src\**\*.nupkg' on_success: - - git config --global credential.helper store - - ps: Add-Content "$HOME\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - - git config --global user.email "michael@ganss.org" - - git config --global user.name "Michael Ganss" - - git tag v%APPVEYOR_BUILD_VERSION% - - git push origin --tags + - ps: | + if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { + git config --global credential.helper store + Add-Content "$HOME\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" + git config --global user.email "michael@ganss.org" + git config --global user.name "Michael Ganss" + git tag v$env:APPVEYOR_BUILD_VERSION + git push origin --tags --porcelain + } \ No newline at end of file diff --git a/src/HtmlSanitizer/HtmlSanitizer.cs b/src/HtmlSanitizer/HtmlSanitizer.cs index c4f2a66..3598785 100644 --- a/src/HtmlSanitizer/HtmlSanitizer.cs +++ b/src/HtmlSanitizer/HtmlSanitizer.cs @@ -398,7 +398,7 @@ namespace Ganss.XSS /// /// Raises the event. /// - /// The instance containing the event data. + /// The instance containing the event data. protected virtual void OnRemovingCssClass(RemovingCssClassEventArgs e) { RemovingCssClass?.Invoke(this, e); @@ -916,8 +916,8 @@ namespace Ganss.XSS /// Removes a CSS class from a class attribute. /// /// Tag the style belongs to - /// Rule to be removed - /// true, if the rule can be removed; false, otherwise. + /// Class to be removed + /// Reason for removal private void RemoveCssClass(IElement tag, string cssClass, RemoveReason reason) { var e = new RemovingCssClassEventArgs { Tag = tag, CssClass = cssClass, Reason = reason }; diff --git a/src/HtmlSanitizer/HtmlSanitizer.csproj b/src/HtmlSanitizer/HtmlSanitizer.csproj index 3065893..33db24d 100644 --- a/src/HtmlSanitizer/HtmlSanitizer.csproj +++ b/src/HtmlSanitizer/HtmlSanitizer.csproj @@ -22,6 +22,8 @@ app.net40.config false Ganss.XSS + true + bin\$(Configuration)\$(TargetFramework)\HtmlSanitizer.xml diff --git a/src/HtmlSanitizer/IHtmlSanitizer.cs b/src/HtmlSanitizer/IHtmlSanitizer.cs index ab39b0d..5302cc3 100644 --- a/src/HtmlSanitizer/IHtmlSanitizer.cs +++ b/src/HtmlSanitizer/IHtmlSanitizer.cs @@ -15,7 +15,7 @@ namespace Ganss.XSS public interface IHtmlSanitizer { /// - /// Gets or sets a value indicating whether to keep child nodes of elements that are removed. Default is . + /// Gets or sets a value indicating whether to keep child nodes of elements that are removed. /// bool KeepChildNodes { get; set; } @@ -25,7 +25,7 @@ namespace Ganss.XSS Func HtmlParserFactory { get; set; } /// - /// Gets or sets the object used for generating output. Default is . + /// Gets or sets the object used for generating output. /// IMarkupFormatter OutputFormatter { get; set; } @@ -90,6 +90,7 @@ namespace Ganss.XSS /// Regex DisallowCssPropertyValue { get; set; } + /// /// Gets or sets the allowed CSS classes. /// /// diff --git a/src/HtmlSanitizer/Iri.cs b/src/HtmlSanitizer/Iri.cs index 5df4e55..2474f1b 100644 --- a/src/HtmlSanitizer/Iri.cs +++ b/src/HtmlSanitizer/Iri.cs @@ -5,10 +5,33 @@ using System.Text; namespace Ganss.XSS { + /// + /// Represents an Internationalized Resource Identifier + /// public class Iri { + /// + /// Gets or sets the value of the IRI. + /// + /// + /// The value of the IRI. + /// public string Value { get; set; } + + /// + /// Gets a value indicating whether the IRI is absolute. + /// + /// + /// true if the IRI is absolute; otherwise, false. + /// public bool IsAbsolute => !string.IsNullOrEmpty(Scheme); + + /// + /// Gets or sets the scheme of the IRI, e.g. http. + /// + /// + /// The scheme of the IRI. + /// public string Scheme { get; set; } } }