You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe it.
The problem is related to testing HTML sanitization in a Rails application. Currently, there is a need for a new HTML generator that can generate HTML code with various elements and attributes to test the effectiveness of the HTML sanitization process. This will help identify any potential vulnerabilities or issues in the sanitization implementation.
If you're adding new objects, please describe how you would use them.
The proposed HTML generator can be used in test suites to generate HTML code with different elements and attributes. This will allow developers to test the effectiveness of the HTML sanitization process in the Rails application. Here's an example of how the generator could be used in a test case:
# Example test case using the HTML generatorrequire'rails_helper'RSpec.describe'HTML sanitization'doit'sanitizes user-generated HTML'doinput_html=Faker::HTML.random# Generate HTML code using the new generatorsanitized_html=sanitize_html(input_html)# Call the HTML sanitization method# Assert that the sanitized HTML does not contain any potentially harmful elements or attributesexpect(sanitized_html).not_toinclude('<script>')expect(sanitized_html).not_toinclude('onclick')endend
This way, the new HTML generator will allow developers to simulate different scenarios and ensure that the HTML sanitization process is working as expected.
Describe alternatives you've considered
One alternative would be manually creating HTML test cases with different elements and attributes. However, this approach can be time-consuming and error-prone, especially when dealing with a large number of test cases. Having a dedicated HTML generator would automate the process and make it easier to generate a wide variety of test cases.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe it.
The problem is related to testing HTML sanitization in a Rails application. Currently, there is a need for a new HTML generator that can generate HTML code with various elements and attributes to test the effectiveness of the HTML sanitization process. This will help identify any potential vulnerabilities or issues in the sanitization implementation.
If you're adding new objects, please describe how you would use them.
The proposed HTML generator can be used in test suites to generate HTML code with different elements and attributes. This will allow developers to test the effectiveness of the HTML sanitization process in the Rails application. Here's an example of how the generator could be used in a test case:
This way, the new HTML generator will allow developers to simulate different scenarios and ensure that the HTML sanitization process is working as expected.
Describe alternatives you've considered
One alternative would be manually creating HTML test cases with different elements and attributes. However, this approach can be time-consuming and error-prone, especially when dealing with a large number of test cases. Having a dedicated HTML generator would automate the process and make it easier to generate a wide variety of test cases.
The text was updated successfully, but these errors were encountered: