-
Notifications
You must be signed in to change notification settings - Fork 19
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
[bug] Input fields does not respect newlines #19
Comments
Hey, I want to work on this issue. I am new here. Need guidance in order to resolve this issue. |
@anurag629 were you able to replicate the issue locally? |
@pandafy I completed the setup but was not able to find out the endpoint where I should write JSON values. |
After creating testapp and model with 'name' field I added the given example code in admins.py file. Is I am doing correct ? |
@anurag629 follow the instructions to run the dev server locally and open the browser to log into the admin interface, navigate to the add form page of JsonDocument and you will find the widget. |
@nemesisdesign I checked in locally. I found that the string in 'Raw JSON Editing' looks fine but in output, it removes '\n'. |
@anurag629 we have to make sure that the value of the string does not change while changing from We have to find out what is removing the newline character |
@pandafy I replicated the issue. |
The bug is definitely in this repository only. I would start looking from https://github.com/openwisp/django-flat-json-widget/blob/master/flat_json_widget/static/flat-json-widget/js/flat-json-widget.js |
@pandafy Am I correct? |
@anurag629 aren't |
Hey there @pandafy I was trying to reproduce the issue. I was able to boot up the server and login to the admin interface. What I am stuck on is finding the route path for jsondocument. |
@himanshuc3 after starting the development server, visit this URL http://127.0.0.1:8000/admin/test_app/jsondocument/ |
@himanshuc3 how are you running the test project? Did you follow these instructions ? |
Followed everything till launching a server. Admin portal works at /admin but admin/test_app/jsondocument/ route doesn't work. |
Hey @pandafy Persisting with the same blocker unfortunately. |
hey @pandafy i want to work upon this issue! |
You can go ahead @mrgear111 |
…sp#19 Fixed an issue where newline characters () in input fields were removed when saving via the HTML form. Updated the logic to ensure newline characters are preserved in both display and saved data. Fixed openwisp#19
…sp#19 Fixed an issue where newline characters () in input fields were removed when saving via the HTML form. Updated the logic to ensure newline characters are preserved in both display and saved data. Fixes openwisp#19
Steps to replicate
\n
)Expected outcome
Actual outcome
var1
field upon saving the data using the HTML formThe text was updated successfully, but these errors were encountered: