Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Categories with ampersand cause issues #146

Open
trouble2 opened this issue May 4, 2021 · 1 comment
Open

Categories with ampersand cause issues #146

trouble2 opened this issue May 4, 2021 · 1 comment
Labels
wontfix This will not be worked on

Comments

@trouble2
Copy link

trouble2 commented May 4, 2021

When you add an ampersand to a categoryname this will give problems (for example) in the settings of the product_view module. Try setting it to the default category, and it won't save or it wil show an error on the configuration page.
So...

  1. either make sure that categories cannot have a name with an ampersand
  2. or (better) make sure that the ampersand does not cause problems in the module settings
@DNNMonster
Copy link
Collaborator

The error that shows up on the product view settings can be avoided with a string is null or empty defensive check for the themedata but it results in the module not saving it's data properly anyhow so it's not really a fix.

The issue lies in the selectedtext attribute of the defaultcatid element that is being generated by the GetGenXmlByAjax func executed by NBrightUtils.GetAjaxInfo in NBrightTS.

The input xml handled by the function GetAjaxInfo receives data as elements with the CDATA tag to wrap the ampersand. However the xml generated by the func GetGenXmlByAjax inside this func returns this same data point as an attribute which is not escaping the ampersand so it introduces problems.

I think we can take advantage of System.Security.SecurityElement.Escape to help out. I'll PR it shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants