-
Notifications
You must be signed in to change notification settings - Fork 61
Validate Direct Input instead of URL #25
Comments
It already does do direct input. |
I meant the webservice. According to the docs, it needs an URI and I don't see a way to enter just content? achecker.ca/documentation/web_service_api.php |
You might take a look at the TinyMCE plugin, which kind of does that. There's no plans though, for direct input via Webservices. It might be a good project for a community member to take on ;-) |
Hi, thanks for the info. I've tried implementing the same logics, but I cannot get it to work. I'm using PHP instead of JavaScript. I'm trying to implement the checker in a Drupal module, and I'm using this code:
Just like here: http://drupal.org/node/221136 Any thoughts on how I could get this to work? |
If you want to take this to the atutor.ca forums, I'll pass you on to Cindy Li, who created the Webservices |
I'm more that willing to do that. However, I can't create an account on the forums. I've tried 4 different usernames, but all seem to be taken (can't believe that, I've tried some random strings). I there another way to contact Cindy Li? |
We had some problems on the atutor.ca server this weekend. I've made a few adjustments, and hoping things are working now. You can try again. |
Thanks for pumping in ideas and looking into code. To achieve what you need, AChecker server side needs to be adjusted to accept the direct html content to be validated. With the current web service implementation: https://github.com/atutor/AChecker/blob/master/checkacc.php#L48-56 The only valid input is URIs. However, extending AChecker to accommodate direct input should not be hard. |
Thanks Cindy for your reply. Implementing this seems rather simple. Is this something you can/will do? Or do you want me to Fork the module and implement it myself? |
Hi BarisW, it might be a while before we do another round of work on achecker. It would get done faster if you wanted to take it on. |
BarisW, this might get you started. Its a diff of checkacc.php. Theres not much to it. @@ -35,6 +35,7 @@ $uri = trim(urldecode($_REQUEST['uri'])); // validate parameters // validating uri content if (isset($validate_content)) |
I've just added a pull request with this functionality also. |
It would awesome if AChecker also supports Direct Input, just like W3C does: http://validator.w3.org/#validate_by_input
I want to validate my content before saving the page, so I need something to validate the content before it's actual a working URL.
Would this be possible?
The text was updated successfully, but these errors were encountered: