python - html text area default value messing with page -


i have python cgi script creates text area , fills default value contents of file. used work noticed change in content on file ;the html rendered incorrectly , submit button , parts of file contents shown in text area(as default content) etc missing or messing total page's html

 print('<form action="x.cgi" method="post">')         print('<textarea name="textcontent" cols="120" rows="50">')         open('somefile', 'r') content_file:             content = content_file.read()         content_file.close()         print(content)         print('</textarea>')         print('<hr>')         print('<input type="submit" value="submit" />')         print('</form>') 

what can done contents of somefile doesnt mess html form . note somefile configuration file , need in file printed such user can make necessary change , submit it


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -