Hide Forgot
Description of problem: Tool will happily create a topic with, for example, a ? in the title. When using the provided link text however: - The topic will not be found, as the ? appears in the xi:include, should be encoded as %3F. - Once the above has been corrected processing still fails as the ? is in the ID attribute of the root node. This character is not valid in an XML ID. Version-Release number of selected component (if applicable): 0.0.8
XML IDs must start with NameStartChar [1] followed by any number of NameChar [2]. I do not think it is desirable to restrict the content users place in the title elements of the topic (which can be basically anything, not nearly as restrictive as the ID). What needs to be done is to update the routine that generates the ID so that in addition to the current basic sanitation checks it also replaces any chars which aren't valid in the ID attribute. The sanitized version should be used both for the ID and for the filename. This would fix the two problems: 1) That the IDs generated when special characters are used in the topic name currently aren't valid under the XML spec. 2) That even those that are, are escaped when saving to the filesystem. Rather than try to code around these in a platform dependent way taking the requirements of the ID in the XML spec gives a very restrictive naming which should be valid on most/all platforms. [1] http://www.w3.org/TR/REC-xml/#NT-NameStartChar [2] http://www.w3.org/TR/REC-xml/#NT-NameChar